HomeUncategorized

findElements(), Handling StaleElementReferenceException and tagName() methods (Selenium 4 – Session 15)

  • findElements() – Used to find and return more than one Web Element
    • findElement() versus findElements()
    • Practical Demonstrations
      • Locating the ‘LogIn’ button and retrieve the label text on the button
      • Locating the Options in Multi-selection box field and retrieve all the options text
      • Locating a set of hyperlinks under a section and opening them one by one
          • StaleElementReferenceException
          • Handling StaleElementReferenceException
        • Locating all the hyperlinks on the web page and retrieving their href attribute values
  • By.tagName()
    • Locating the elements using tag name
      • Locating all the elements having the input tag on the web page and printing their type
      • Print all the hyperlink’s href attribute value on the web page

By,
Arun Motoori

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp