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: 244

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.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service