24 lines
501 B
Java
24 lines
501 B
Java
package page;
|
|
|
|
import org.openqa.selenium.WebDriver;
|
|
import org.openqa.selenium.WebElement;
|
|
import org.openqa.selenium.support.FindBy;
|
|
|
|
public class RulesPage {
|
|
WebDriver driver;
|
|
|
|
@FindBy(xpath = "//*[@id=\"MainContent\"]/p[2]/a")
|
|
private WebElement externalLink;
|
|
|
|
public RulesPage(WebDriver driver) {
|
|
this.driver = driver;
|
|
}
|
|
|
|
public String getLinkText(){
|
|
return externalLink.getText();
|
|
}
|
|
|
|
public void clickLink() {
|
|
externalLink.click();
|
|
}
|
|
} |