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 is the command to connect a node to the selenium grid?
What are the popular programming languages supported by selenium webdriver to write test cases?
What are the advantages of using git hub for selenium?
What programming language is best for writing selenium tests?
What test can selenium perform?
How to handle the AJAX popup window?
Explain the difference between assert and verify commands?
How to retrieve css properties of an element?
What are the challenges with selenium ide?
What does a right-pointing green triangle at the beginning of a command in side indicate?
Explain how to assert text of webpage using selenium 2.0?
What will be the different kinds of locators in selenium?
How to select value in a dropdown?
Why should selenium be selected as a test tool?
Explain how you can insert a start point in selenium ide?