From 3ca6cc1aa3573ef6f3097b9389c6d72bb9eca86f Mon Sep 17 00:00:00 2001 From: Almira Date: Thu, 13 Dec 2018 13:40:57 +0000 Subject: [PATCH] Update FilterBy.java --- .../test/java/ru/sports/pages/FilterBy.java | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/Zamaldinova/src/test/java/ru/sports/pages/FilterBy.java b/Zamaldinova/src/test/java/ru/sports/pages/FilterBy.java index 1fed10c..4f82641 100644 --- a/Zamaldinova/src/test/java/ru/sports/pages/FilterBy.java +++ b/Zamaldinova/src/test/java/ru/sports/pages/FilterBy.java @@ -108,43 +108,47 @@ public class FilterBy { return driver.findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div >" + " aside > section:nth-child(3) > div > form > label > input")).isDisplayed(); } - public boolean AssertUseFilter() { - + public boolean AssertUseFilterForNewsOfMyComand() { try { + return driver.findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div " + - "> aside > section:nth-child(3) > div > div > ul > li > a")).getText().indexOf(" Жеребьевка Евро-2020") >= 0; + "> aside > section:nth-child(3) > div > div > ul > li > a")).getText().indexOf("Жеребьевка Евро-2020. Россия сыграет с Бельгией, Шотландией, Кипром, Казахстаном и Сан-Марино") >= 0; } catch (Exception e) { return false; } - } - public boolean AssertUseFilterForNewsFromUsers() { - try { - return driver.findElement(By.cssSelector("#branding-layout > " + - "div.page-layout > div > div > div > div > aside > section:nth-child(16) > div >" + - " div.users-news__tabs.tabs_state_horizontal.tabs.tabs_animate.tabs_animate_horizontal-slide >" + - " div.tabs__body >" + - " div.users-news__tabs-panel.users-news__top-panel.tabs__panel.tabs__panel_active > " + - "ul:nth-child(4) > li")).getText().indexOf(" Зал славы бейсбола") >= 0; - } - catch (Exception e) - { - return false; - } + } - public boolean AssertUseFilterForStatistics() { - + public boolean AssertUseFilterForNewsFromUsers() { try { - return driver.findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > aside > section:nth-child(6) > div > div.gadget__tournament-data > div > div:nth-child(1) > div.accordion__body" + - " > table > tbody > tr:nth-child(2) > td:nth-child(2) > a")).getText().indexOf("Истанбул") >= 0; + + return driver.findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > div > div > aside > section:nth-child(16) > div > div.users-news__tabs.tabs_state_horizontal.tabs.tabs_animate.tabs_animate_horizontal-slide > div.tabs__body >" + + " div.users-news__tabs-panel.users-news__top-panel.tabs__panel.tabs__panel_active " + + "> ul:nth-child(2) > li > a")).getText().indexOf("МЛБ. Определились все участники плей-офф") >= 0; } catch (Exception e) { return false; } + + + } + + public boolean AssertUseFilterForStatistics() { + try { + + return driver.findElement(By.cssSelector("#branding-layout > div.page-layout > div > div > aside > section:nth-child(6) > div > div.gadget__tournament-data > div > div:nth-child(1)" + + " >div.accordion__body > table > tbody > tr:nth-child(2) > td:nth-child(2) > a")).getText().indexOf("Истанбул") >= 0; + } + catch (Exception e) + { + return false; + } + + }