예제 #1
0
        public void CheckSquareCenterFieldIsClickable()
        {
            var playInPage = new PlayInPage(_webDriver);

            playInPage.GoToPlayInPage();
            playInPage.ClickCenter();
            Thread.Sleep(500);

            var actualResult = playInPage.GetCenter();

            Assert.AreEqual("x", actualResult);
        }
예제 #2
0
        public void CheckUpdateScoreForAppear()
        {
            var playInPage = new PlayInPage(_webDriver);

            playInPage.GoToPlayInPage();
            playInPage.ClickPlayer2();
            playInPage.ClickRight();
            playInPage.ClickLeft();
            playInPage.ClickTopRight();
            playInPage.ClickBottomLeft();
            playInPage.ClickCenter();
            playInPage.ClickTopLeft();
            Thread.Sleep(3000);

            var actualResult = playInPage.GetScoreAppear();

            Assert.AreEqual("1", actualResult);
        }
예제 #3
0
        public void EasyWin()
        {
            var playInPage = new PlayInPage(_webDriver);

            playInPage.GoToPlayInPage();
            playInPage.ClickCenter();
            Thread.Sleep(2000);

            if (playInPage.GetRight() == "o" || playInPage.GetTop() == "o" || playInPage.GetBottom() == "o" || playInPage.GetLeft() == "o")
            {
                playInPage.ClickBottomRight();
                Thread.Sleep(1000);
            }
            else if (playInPage.GetBottomRight() == "o" || playInPage.GetTopRight() == "o" || playInPage.GetBottomLeft() == "o" || playInPage.GetTopLeft() == "o")
            {
                playInPage.ClickTopRight();
            }

            playInPage.ClickBottomLeft();
            Thread.Sleep(2000);

            if (playInPage.GetTopRight() != "o")
            {
                playInPage.ClickTopRight();
                Thread.Sleep(2000);
            }
            else if (playInPage.GetBottom() != "o")
            {
                playInPage.ClickBottom();
                Thread.Sleep(2000);
            }

            var actualResult = playInPage.GetScoreAppear();

            Assert.AreEqual("1", actualResult);
        }