Exemplo n.º 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')]")));
 }
Exemplo n.º 2
0
 public GroupCreateWindow AddTeacher(String value)
 {
     AddTeacherButton.Click();
     Acts.SelectOptionFromDDL(TeacherDDL, value);
     AcceptSelectTeacherButton.Click();
     return(this);
 }
Exemplo n.º 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());
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 public bool AreGroupsVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='group-collection row']")));
 }
Exemplo n.º 7
0
 public GroupCreateWindow SetDirection(String value)
 {
     Acts.SelectOptionFromDDL(DirectionDDL, value);
     return(this);
 }
Exemplo n.º 8
0
 public bool IsButtonChosen(IWebElement button)
 {
     return(Acts.GetAttribute(button, "class").Contains("pressed"));
 }
Exemplo n.º 9
0
 public bool IsDeleteButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Delete' and not(@disabled)]")));
 }
Exemplo n.º 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());
 }
Exemplo n.º 11
0
 public bool IsExpertHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='add-expert clearfix']//p[@class='hint']")));
 }
Exemplo n.º 12
0
 public bool IsDirectionHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][2]//p[@class='hint']")));
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 17
0
 public bool IsMainPageOpened()
 {
     return(Acts.IsElementExists(driver, By.Id("main-section")) &
            Acts.IsElementExists(driver, By.CssSelector("#logo > a > img")));
 }
Exemplo n.º 18
0
 public CreateEditStudentsForm setEnglishLevelDDL(int value)
 {
     Acts.SelectOptionFromDDL(EnglishLevelDDL, value);
     return(this);
 }
Exemplo n.º 19
0
 public bool IsOpened()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='modal-window']//section[@class='modal-window create']")));
 }
Exemplo n.º 20
0
        public void LogoutUsingTopMenu()
        {
            TopMenu topMenuInstance = MoveToTopMenu();

            Acts.Click(topMenuInstance.LogoutButton);
        }
Exemplo n.º 21
0
 public bool IsGroupNameHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='form-group name-wrapper col-xs-12']//p[@class='hint']")));
 }
Exemplo n.º 22
0
 public CreateEditUsersForm selectRole(int value)
 {
     Acts.SelectOptionFromDDL(RoleDDL, value);
     return(this);
 }
Exemplo n.º 23
0
 public bool IsFinishDateHintVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='row'][3]/div[contains(@class, 'calendar-wrapper')]//p[@class='hint']")));
 }
Exemplo n.º 24
0
 public CreateEditGroupsForm setStageDDL(int value)
 {
     Acts.SelectOptionFromDDL(StageDDL, value);
     return(this);
 }
Exemplo n.º 25
0
 public bool IsCancelButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.Id("cancel")));
 }
Exemplo n.º 26
0
 public bool AreAboutButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='contributors-menu']")));
 }
Exemplo n.º 27
0
 public bool IsSearchButtonVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@id='left-menu']//button[@title='Search']")));
 }
Exemplo n.º 28
0
 public bool AreTogglesVisible()
 {
     return(Acts.IsElementVisible(driver, By.XPath("//div[@class='stage-toggle']/label")));
 }
Exemplo n.º 29
0
 public CreateEditUsersForm selectLocation(int value)
 {
     Acts.SelectOptionFromDDL(LocationDDL, value);
     return(this);
 }
Exemplo n.º 30
0
 public bool IsGroupChosen(IWebElement group)
 {
     return(Acts.GetAttribute(group, "class").Contains("chosen"));
 }