0

Please find below HTML code. In this code there is more space for the agile/scrum text. enter image description here

I tried by executing with space and without space

And I Press "Agile / Scrum"
And I Press "              Agile / Scrum            "
When I click "              Agile / Scrum            "

Below are the error message….

Fatal error: Call to a member function doubleClick() on a non-object in C:\behat\Regression\features\bootstrap\FeatureContext.php on line 374

When I click "              Agile / Scrum            " # FeatureContext::assertClick()
  Link with id|title|alt|text "              Agile / Scrum            " not found.

Please give some suggestion.Thanks in advance.

Suraj
  • 297
  • 3
  • 18

1 Answers1

0

For links you can use: I follow "link text"

In your case: I follow "Agile / Scrum"

You need to inspect the page and copy the link without left/right spaces. It should work also with only Agile or only Scrum if these are the only links with this name.

'I press' should be used if the type of element is button.

For click on other type of element you can create a custom method, but keep in mind that you might not have the desired attribute so is better to create a method that clicks on a selector.

lauda
  • 4,153
  • 2
  • 14
  • 28