Difference between @findByMethod and @findelement?
Answer Posted / ram
findElement() :
-Find the first element within the current page using the given "locating mechanism".
-Returns a single WebElement.
-Syntax: WebElement findElement(By by).
–will throw "NoSuchElementException" if no matching element found
findElements() :
-Find all elements within the current page using the given "locating mechanism".
-Returns List of WebElements.
-Syntax: java.util.List<WebElement> findElements(By by)
–will return a empty list if no matching elements found and no exception will be thrown
| Is This Answer Correct ? | 6 Yes | 13 No |
Post New Answer View All Answers
What are some advantages of selenium grid?
How could ajax controls be handled in webdriver?
what is the difference between driver.get() and driver.navigate.to(“url”)?
What happens if I run this command. Driver.get(“www.softwaretestingmaterial.com”) ;
Explain how you can capture server side log selenium server?
What is assertion in selenium?
What is the difference between find element and find elements?
What are the types of webdriver apis available in selenium?
Can we use selenium grid for performance testing?
How to insert a start point in selenium ide?
What must one set within side in order to run a test from the beginning to a certain point within the test?
What’s the difference between borland silk evaluation and selenium?
What are selenium tests normally named (as displayed at the top of each test when viewed from within a browser)?
When should one use selenium grid?
Which are the commands used for capturing the bitmaps?