package conference; import core.PageObject; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import java.util.List; public class ConferencePage extends PageObject { public String getSubTitle() { return driver.findElement(By.tagName("h3")).getText(); } public String getId() { return driver.findElement(By.id("id")).getAttribute("value"); } public void setName(String name) { driver.findElement(By.id("title")).sendKeys(name); } public String getName() { return driver.findElement(By.id("title")).getAttribute("value"); } public void clearName() { driver.findElement(By.id("title")).clear(); } public void clickSaveBut() { driver.findElement(By.id("send-message-button")).click(); } public void clickAddDeadlineBut() { driver.findElement(By.id("addDeadline")).click(); } public List getDeadlineList() { return driver.findElements(By.className("deadline")); } public Integer getDeadlineCount() { return driver.findElements(By.className("deadline")).size(); } public void setDeadlineDescription(String description, Integer i) { driver.findElement(By.id(String.format("deadlines%d.description", i))).sendKeys(description); } public void setDeadlineDate(String date, Integer i) { driver.findElement(By.id(String.format("deadlines%d.date", i))).sendKeys(date); } }