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


Please Help Members By Posting Answers For Below Questions

What You Know About Selenium Grid?

545


What are the different types of frameworks?

518


How to switch between frames in selenium?

502


How to developer selenium test cases?

502


What are the significant changes/upgrades in various selenium versions?

508






How to handle a dropdown in selenium webdriver?

2509


Where to obtain selenium ?

488


What are the testing types that can be supported by selenium?

503


What is Selenium IDE?

540


How do you verify if the checkbox/radio is checked or not?

430


How can we deal with pop-up windows based on?

513


How to login to any site if it’s showing any authentication popup for

523


What does side stand for?

525


Explain how you can insert a start point in selenium ide?

473


What is the difference between find elements () and find element ()?

462