Beispiel #1
0
 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')]")));
 }
Beispiel #2
0
 public GroupCreateWindow AddTeacher(String value)
 {
     AddTeacherButton.Click();
     Acts.SelectOptionFromDDL(TeacherDDL, value);
     AcceptSelectTeacherButton.Click();
     return(this);
 }
Beispiel #3
0
        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());
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 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;
 }
Beispiel #6
0
 public bool AreGroupsVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='group-collection row']")));
 }
Beispiel #7
0
 public GroupCreateWindow SetDirection(String value)
 {
     Acts.SelectOptionFromDDL(DirectionDDL, value);
     return(this);
 }
Beispiel #8
0
 public bool IsButtonChosen(IWebElement button)
 {
     return(Acts.GetAttribute(button, "class").Contains("pressed"));
 }
Beispiel #9
0
 public bool IsDeleteButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Delete' and not(@disabled)]")));
 }
Beispiel #10
0
 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());
 }
Beispiel #11
0
 public bool IsExpertHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='add-expert clearfix']//p[@class='hint']")));
 }
Beispiel #12
0
 public bool IsDirectionHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][2]//p[@class='hint']")));
 }
Beispiel #13
0
        //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);
        }
Beispiel #14
0
        //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);
        }
Beispiel #15
0
        //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);
        }
Beispiel #16
0
        //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);
        }
Beispiel #17
0
 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);
 }
Beispiel #19
0
 public bool IsOpened()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='modal-window']//section[@class='modal-window create']")));
 }
Beispiel #20
0
        public void LogoutUsingTopMenu()
        {
            TopMenu topMenuInstance = MoveToTopMenu();

            Acts.Click(topMenuInstance.LogoutButton);
        }
Beispiel #21
0
 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);
 }
Beispiel #23
0
 public bool IsFinishDateHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][3]/div[contains(@class, 'calendar-wrapper')]//p[@class='hint']")));
 }
Beispiel #24
0
 public CreateEditGroupsForm setStageDDL(int value)
 {
     Acts.SelectOptionFromDDL(StageDDL, value);
     return(this);
 }
Beispiel #25
0
 public bool IsCancelButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.Id("cancel")));
 }
Beispiel #26
0
 public bool AreAboutButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='contributors-menu']")));
 }
Beispiel #27
0
 public bool IsSearchButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Search']")));
 }
Beispiel #28
0
 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);
 }
Beispiel #30
0
 public bool IsGroupChosen(IWebElement group)
 {
     return(Acts.GetAttribute(group, "class").Contains("chosen"));
 }