From 1823c1ba50c959dde3197fbfa64a516e9ffa1b3c Mon Sep 17 00:00:00 2001 From: T-Midnight Date: Mon, 20 May 2019 18:37:24 +0400 Subject: [PATCH] #120 create kias page --- src/test/java/grant/KiasPage.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/test/java/grant/KiasPage.java diff --git a/src/test/java/grant/KiasPage.java b/src/test/java/grant/KiasPage.java new file mode 100644 index 0000000..49b40d9 --- /dev/null +++ b/src/test/java/grant/KiasPage.java @@ -0,0 +1,28 @@ +package grant; + +import core.PageObject; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +import java.util.List; + +public class KiasPage extends PageObject { + @Override + public String getSubTitle() { + return driver.findElement(By.tagName("h1")).getText(); + } + + public List getGrants() { + WebElement listContest = driver.findElement(By.tagName("tBody")); + return listContest.findElements(By.cssSelector("tr.tr")); + + } + + public String getGrantTitle(WebElement grant) { + return grant.findElement(By.cssSelector("td.tertiary")).findElement(By.tagName("a")).getText(); + } + + public String getFirstDeadline(WebElement grant) { + return grant.findElement(By.xpath("./td[5]")).getText(); + } +}