Quality Testing

Quality is delighting customers

What is the difference between findElement and findElements in Selenium?

Hi, Can any one explain the difference between findElement and findElements with example.

Views: 255

Reply to This

Replies to This Discussion

findElement - it will return the first Webelement find by the locator specified.
example = say you wanted to click on some element

findElements = this returns a list of webelement found by the given selector.
example = say you wanted to get all items in a table then wanted to perform operation on them one by one.


TTWT Magazine





© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service