예제 #1
0
        public GamePage ScrollDownSeeStoryDetails()
        {
            var scroll = new ScrollIntoView(driver);

            scroll.ScrollDown();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(completedStoriesTab)).Click();
            var game = new GamePage(driver, wait);

            return(game);
        }
예제 #2
0
        public GamePage GetReport()
        {
            var scroll = new ScrollIntoView(driver);

            scroll.ScrollDown();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.ClassName("btn-edit"))).Click();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(exportStories));
            var game = new GamePage(driver, wait);

            return(game);
        }
예제 #3
0
        public GamePage DeleteStory()
        {
            var scroll = new ScrollIntoView(driver);

            scroll.ScrollDown();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(deleteStoryButton)).Click();
            driver.SwitchTo().Alert().Accept();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(storyListName));
            var game = new GamePage(driver, wait);

            return(game);
        }
예제 #4
0
        public GamePage EditStories(string editedStory)
        {
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(startButton));
            var scroll = new ScrollIntoView(driver);

            scroll.ScrollDown();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(storyListName)).Click();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector("input.ng-scope"))).Clear();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.CssSelector("input.ng-scope"))).SendKeys(editedStory);
            driver.FindElement(By.CssSelector("div.in:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(3) > div:nth-child(1)")).Click();
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(storyListName));
            var game = new GamePage(driver, wait);

            return(game);
        }