cdm-dataportal/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/VisibilityOfElementLocated.java @ adfb51b3
1 |
/**
|
---|---|
2 |
*
|
3 |
*/
|
4 |
package eu.etaxonomy.dataportal.selenium; |
5 |
|
6 |
import org.openqa.selenium.By; |
7 |
import org.openqa.selenium.WebDriver; |
8 |
|
9 |
import com.google.common.base.Function; |
10 |
|
11 |
/**
|
12 |
* @author andreas
|
13 |
*
|
14 |
*/
|
15 |
public class VisibilityOfElementLocated implements Function<WebDriver, Boolean> { |
16 |
|
17 |
By findCondition; |
18 |
|
19 |
public VisibilityOfElementLocated(By by) { |
20 |
this.findCondition = by; |
21 |
}
|
22 |
|
23 |
/* (non-Javadoc)
|
24 |
* @see com.google.common.base.Function#apply(java.lang.Object)
|
25 |
*/
|
26 |
public Boolean apply(WebDriver driver) { |
27 |
driver.findElement(this.findCondition); |
28 |
return Boolean.valueOf(true); |
29 |
}
|
30 |
|
31 |
}
|