![JAR search and dependency download from the Maven repository](/logo.png)
com.polonium.webdriver.example.pages.OnetMainPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polonium-webdriver Show documentation
Show all versions of polonium-webdriver Show documentation
Polonium-Webdriver extends polonium core with paging functionality (page-object pattern),
and handles/recognizes fails made by selenium driver. This version has Polonium-Core included.
package com.polonium.webdriver.example.pages;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.polonium.webdriver.PoloniumPage;
import com.polonium.webdriver.annotations.PageURL;
@PageURL("http://www.onet.pl")
public class OnetMainPage extends PoloniumPage{
private static final String DEFAULT_SEARCH_PHASE = "test";
@FindBy(id = "searchQuery")
WebElement searchField;
@FindBy(id = "searchSubmit")
WebElement searchButton;
public OnetMainPage fillSearchField(String phase){
searchField.sendKeys(phase);
return this;
}
public OnetMainPage fillSearchField(){
return fillSearchField(DEFAULT_SEARCH_PHASE);
}
public SearchResultsPage clickSearchButton(){
searchButton.submit();
return new SearchResultsPage();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy