Пример #1
0
        public void Init()
        {
            //Deleting cookies in ie browser through command line.
            /*var procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2");
            var proc = new System.Diagnostics.Process { StartInfo = procStartInfo };
            proc.Start();
            WebDriverObj = new InternetExplorerDriver();
            */
            string URL = "https://stg-gib.ladbrokes.com/admin";
            WebDriverObj = new FirefoxDriver();
            MyBrowser = new WebDriverBackedSelenium(WebDriverObj, URL);
            MyBrowser.Start();
            WebDriverObj.Manage().Window.Maximize();
            MyBrowser.WindowMaximize();

            MyBrowser.Open(URL);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Refresh();
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Type(TestDataCreation.ControlsRepository.UsrNmeTxtBx, "Automation1");
            MyBrowser.Type(TestDataCreation.ControlsRepository.PwdTxtBx, "aditi123");
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Click(TestDataCreation.ControlsRepository.LoginBtn);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
        }
Пример #2
0
        public void Test8_OverallStats()
        {
            selenium.Click("//a[contains(@href, '/UserActivity/Overall')]");
            selenium.WaitForPageToLoad("30000");
            String todayNumberOfRequests = selenium.GetText("//div[@id='main']/table/tfoot/tr/td[3]");

            selenium.Refresh();
            selenium.WaitForPageToLoad("30000");
            try
            {
                Assert.AreNotEqual(todayNumberOfRequests, selenium.GetText("//div[@id='main']/table/tfoot/tr/td[3]"));
            }
            catch (AssertionException e)
            {
                // verificationErrors.Append(e.Message);
            }
            selenium.Click("//a[contains(@href, '/Security/Index')]");
            selenium.WaitForPageToLoad("30000");
        }