Verify Specific Text in Selenium IDE Attribute



We can verify specific text exists with an attribute in Selenium IDE. This can be done using the assert and verify commands −

  • assert element present − Verifies if the element exists on the page. If assertion fails, the test terminates. It has the element locator as an argument.

For example −

  • assert element not present − Verifies if the element does not exist on the page. If assertion fails, the test terminates. It has the element locator as an argument.

  • verify element present − Verifies if the element exists on the page. It has the element locator as an argument.

  • verify element not present − Verifies if the element does not exist on the page. It has the element locator as an argument.

For example −

  • assert text − Verifies if the element text has the given value. If assertion fails, the test terminates. It has the element locator and the text to be exactly matched as arguments.

  • verify text − Verifies if the element text exists on the page. It has the element locator and the text to be matched as arguments. It is a soft assertion and the test continues even on failure.

For example −

  • verify not text − Verifies if the element text does not exist on the page. It has the element locator and the text to be matched as arguments. It is a soft assertion and the test continues even on failure.

Updated on: 2020-11-28T13:36:20+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements