![JAR search and dependency download from the Maven repository](/logo.png)
demo.GooglePage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of conditions Show documentation
Show all versions of conditions Show documentation
ExpectedCondition annotation for WebElements and Controls
package demo;
import com.github.metalloid.pagefactory.FindAll;
import com.github.metalloid.pagefactory.FindBy;
import com.github.metalloid.pagefactory.PageFactory;
import com.github.metalloid.pagefactory.components.FindComponent;
import com.github.metalloid.webdriver.utils.conditions.ConditionEvaluator;
import com.github.metalloid.webdriver.utils.conditions.ExpectedCondition;
import com.github.metalloid.webdriver.utils.conditions.Invisibility;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import java.util.List;
public class GooglePage {
@ExpectedCondition(timeout = 10, condition = Invisibility.class)
@FindBy(css = "input[name='q']")
public TextField searchFieldTF;
@FindBy(css = "input[name='q']")
public List searchFieldTFList;
@FindBy(css = "input[name='q']")
public WebElement searchFieldWebElement;
@FindBy(css = "input[name='q']")
public List searchFieldWebElementList;
@FindAll({@FindBy(css = "input[name='q']")})
public TextField searchFieldAllTF;
@FindAll({@FindBy(css = "input[name='q']")})
public List searchFieldAllTFList;
@FindAll({@FindBy(css = "input[name='q']")})
public WebElement searchFieldAllWebElement;
@FindAll({@FindBy(css = "input[name='q']")})
public List searchFieldAllWebElementList;
@FindComponent
public SearchComponent searchComponent;
public GooglePage(WebDriver driver) {
PageFactory.init(driver, this);
ConditionEvaluator.evaluate(driver, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy