Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How you will login into any site if it is showing any authentication popup for username and password?

957


How will you handle working with multiple windows in selenium?

902


What is the reason to use the selenium grid?

953


What programming languages does Selenium use?

1016


How you can handle frames using selenium 2.0?

979


How to handle a dropdown in selenium webdriver? How to select a value from dropdown?

929


What are the different types of frameworks?

933


How can we select elements by their attribute value using css selector?

1132


How can we maximize browser window in selenium?

1076


What is object repository? How can we create an object repository in selenium?

1173


Other than the default port 444 how you can run selenium server?

1213


How you can insert a start point in selenium ide?

927


What is the difference between driver.close() and driver.quit command?

1002


What is the difference between the commit and verify commands?

1051


Define selenium 2.x?

1071