How to verify specific text exists within an attribute in Selenium IDE?

Software TestingAutomation TestingSelenium Web Driver

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.

raja
Published on 28-Nov-2020 18:06:08
Advertisements