public bool AreDevEventsExist(IWebDriver driver) { return (Acts.IsElementPresent(driver, By.XPath("//li[@class='lectures-wrapper-button']/child::label[contains (text(),'Practice')]")) & Acts.IsElementPresent(driver, By.XPath("//li[@class='lectures-wrapper-button']/child::label[contains (text(),'Weekly report')]")) & Acts.IsElementPresent(driver, By.XPath("//li[@class='lectures-wrapper-button']/child::label[contains (text(),'Work with Expert')]"))); }
public GroupCreateWindow AddTeacher(String value) { AddTeacherButton.Click(); Acts.SelectOptionFromDDL(TeacherDDL, value); AcceptSelectTeacherButton.Click(); return(this); }
public void Open(WebDriverWait wait) { MainPage mainPage = new MainPage(driver); wait.Until((d) => Acts.IsElementExists(driver, By.XPath("//div[@id='right-menu']//i[contains(@class, 'sign-out')]"))); mainPage.ProfileButton.Click(); wait.Until((d) => IsLogOutButtonVisible()); }
public List <String> GetAvailableButtonsTitles() { IList <IWebElement> webElems = driver.FindElements(By.XPath("//div[@id='left-menu']//button")); List <String> titles = new List <String>(); foreach (var item in webElems) { titles.Add(Acts.GetAttribute(item, "title")); } return(titles); }
public static bool IsMainPageOpened(IWebDriver driver) { return(Acts.IsElementExists(driver, By.Id("main-section")) & Acts.IsElementExists(driver, By.Id("left-side-bar")) & Acts.IsElementExists(driver, By.Id("right-side-bar")) ? true : false); //return driver.FindElements(By.Id("main-section")).Count > 0 & // driver.FindElements(By.Id("left-side-bar")).Count > 0 & // driver.FindElements(By.Id("left-side-bar")).Count > 0 ? // true : false; }
public bool AreGroupsVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='group-collection row']"))); }
public GroupCreateWindow SetDirection(String value) { Acts.SelectOptionFromDDL(DirectionDDL, value); return(this); }
public bool IsButtonChosen(IWebElement button) { return(Acts.GetAttribute(button, "class").Contains("pressed")); }
public bool IsDeleteButtonVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Delete' and not(@disabled)]"))); }
public void Open(Actions act, WebDriverWait wait) { wait.Until((d) => Acts.IsElementExists(driver, By.CssSelector("#left-menu > div"))); act.MoveToElement(LeftMenuSection, 100, 200).Perform(); wait.Until((d) => IsSearchButtonVisible()); }
public bool IsExpertHintVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='add-expert clearfix']//p[@class='hint']"))); }
public bool IsDirectionHintVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][2]//p[@class='hint']"))); }
//This method can return new instance of 'About' page so change it in case of need public void OpenAboutPage() { TopMenu topMenuInstance = MoveToTopMenu(); Acts.Click(topMenuInstance.AboutItem); }
//This method can return new instance of 'Students' page so change it in case of need public void OpenStudentsPage() { TopMenu topMenuInstance = MoveToTopMenu(); Acts.Click(topMenuInstance.StudentsItem); }
//This method can return new instance of 'Groups' page so change it in case of need public void OpenGroupsPage() { TopMenu topMenuInstance = MoveToTopMenu(); Acts.Click(topMenuInstance.GroupsItem); }
//This method can return new instance of 'Locations' window so change it in case of need public void OpenLocationsWindow() { TopMenu topMenuInstance = MoveToTopMenu(); Acts.Click(topMenuInstance.LocationsItem); }
public bool IsMainPageOpened() { return(Acts.IsElementExists(driver, By.Id("main-section")) & Acts.IsElementExists(driver, By.CssSelector("#logo > a > img"))); }
public CreateEditStudentsForm setEnglishLevelDDL(int value) { Acts.SelectOptionFromDDL(EnglishLevelDDL, value); return(this); }
public bool IsOpened() { return(Acts.IsElementVisible(driver, By.XPath("//div[@id='modal-window']//section[@class='modal-window create']"))); }
public void LogoutUsingTopMenu() { TopMenu topMenuInstance = MoveToTopMenu(); Acts.Click(topMenuInstance.LogoutButton); }
public bool IsGroupNameHintVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='form-group name-wrapper col-xs-12']//p[@class='hint']"))); }
public CreateEditUsersForm selectRole(int value) { Acts.SelectOptionFromDDL(RoleDDL, value); return(this); }
public bool IsFinishDateHintVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][3]/div[contains(@class, 'calendar-wrapper')]//p[@class='hint']"))); }
public CreateEditGroupsForm setStageDDL(int value) { Acts.SelectOptionFromDDL(StageDDL, value); return(this); }
public bool IsCancelButtonVisible() { return(Acts.IsElementVisible(driver, By.Id("cancel"))); }
public bool AreAboutButtonVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='contributors-menu']"))); }
public bool IsSearchButtonVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Search']"))); }
public bool AreTogglesVisible() { return(Acts.IsElementVisible(driver, By.XPath("//div[@class='stage-toggle']/label"))); }
public CreateEditUsersForm selectLocation(int value) { Acts.SelectOptionFromDDL(LocationDDL, value); return(this); }
public bool IsGroupChosen(IWebElement group) { return(Acts.GetAttribute(group, "class").Contains("chosen")); }