Difference between @findByMethod and @findelement?
Answer Posted / elakkiya
Both methods are used to find the webelements.
findelement:
-------------------
This is one of the abstract method , should be used to find the single web element.
Return type is single web element.
@Findby:
--------------
This is one Annotation in Page factory model and used to locate one or more WebElements using a single criterion.
it has two kind of methods as follows.
• The @FindBys annotation is used in case elements need to match all of the given criteria
• The @FindAll annotation is used in case elements need to match at least one of the given criteria
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the difference between driver.close() and driver.quit() methods?
Name the different types of waits in webdriver.
While injecting capabilities in webdriver to perform tests on a browser which is not supported by a webdriver what is the limitation that one can come across?
What are some disadvantages of Selenium automation?
what is your approach clicking all the links which are available on the page?
Explain what is the difference between find elements () and find element ()?
How can we maximize browser window in selenium?
What happen if you mix both implicit wait and explicit wait in a selenium script?
How can we check if an element is enabled for interaction on a web page?
Write a code to wait for a particular element to be visible on a page. Write a code to wait for an alert to appear.
What are the important features of selenium ide?
Tell us can you write the code to double click an element in selenium?
How to assert the title of the web page?
What are the annotations available in testng?
Can you write the code to double click an element in selenium?