1
|
/**
|
2
|
*
|
3
|
*/
|
4
|
package eu.etaxonomy.dataportal.selenium;
|
5
|
|
6
|
import org.openqa.selenium.WebDriver;
|
7
|
|
8
|
import com.google.common.base.Function;
|
9
|
|
10
|
/**
|
11
|
* @author andreas
|
12
|
*
|
13
|
*/
|
14
|
public class PageTitleValidated implements Function<WebDriver, Boolean> {
|
15
|
|
16
|
private final String title;
|
17
|
|
18
|
public PageTitleValidated(String title) {
|
19
|
this.title = title;
|
20
|
}
|
21
|
|
22
|
/* (non-Javadoc)
|
23
|
* @see com.google.common.base.Function#apply(java.lang.Object)
|
24
|
*/
|
25
|
@Override
|
26
|
public Boolean apply(WebDriver driver) {
|
27
|
boolean validated = driver.getTitle().equals(title);
|
28
|
return Boolean.valueOf(validated);
|
29
|
}
|
30
|
|
31
|
}
|