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); } }