Update FilterBy.java

This commit is contained in:
Almira 2018-12-13 13:40:57 +00:00
parent 14862c7ce3
commit 3ca6cc1aa3

View File

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