tis-2017/Nagaytseva/src/test/java/page/PageInformationRelease.java
2018-05-03 19:56:06 +03:00

44 lines
1.0 KiB
Java

package page;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class PageInformationRelease {
WebDriver driver;
@FindBy(className = "previous")
private WebElement elementBackBtmNews;
@FindBy(className = "next")
private WebElement elementNextBtmNews;
@FindBy(id = "pagecontentforsolr")
private WebElement content;
@FindBy(xpath = "//*[@id=\"pagecontentforsolr\"]/div[4]")
private WebElement title;
public PageInformationRelease(WebDriver driver) {
this.driver = driver;
}
public void clickBtmBack() {
elementBackBtmNews.click();
}
public void clickBtmNext() {
elementBackBtmNews.click();
}
public boolean disposeMainInformation() {
return content.isDisplayed();
}
public boolean displayNewsInformationTrue(String str) {
return title.getText().contains(str);
}
}