Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.40 KB | None | 0 0
  1.  def WaitTillAllDisplayed(arg: String){
  2.     new WebDriverWait(driver, 100).until(new ExpectedCondition[Boolean] {
  3.       @Override
  4.       override def apply(d: WebDriver){
  5.         var count =0
  6.         val list = d.findElements(By.xpath(arg))
  7.         for(i <- 0 to list.size()-1){
  8.           if(list.get(i).isDisplayed)
  9.             count +=1
  10.         }
  11.         count == list.size()
  12.       }
  13.  
  14.     })
  15.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement