June 26, 2015

findElement vs findElements

Here is the post how to use findelements...

findElement()

  1. Find the first element within the current page
  2. Returns a single WebElement.
  3.  Syntax: WebElement findElement(By by)
findElements()

  1. Find all elements within the current page.
  2. Returns List of WebElements.
  3. Syntax:  java.util.List findElements(By by)

In this scenario i will show search for restaurants and  get number of results on webpage and get ratings of each restaurant .


No comments:

Post a Comment