Exemplo n.º 1
0
 public void Dispose()
 {
     if (Driver != null)
     {
         DriverPool.Release(Driver);
     }
     Driver = null;
 }
Exemplo n.º 2
0
        public void ReturnButtonIsWorked()
        {
            DriverPool.Get().Navigate().GoToUrl(testServer + "?page_number=25&intitle=test&page=1");

            var searchPage  = new SearchPage();
            var resultsPage = new SearchResultsPage();

            resultsPage.ClickReturnButton();

            Assert.IsTrue(searchPage.StackOverSearchTextIsDisplayed());
        }
Exemplo n.º 3
0
        public void SearchIsWorked()
        {
            DriverPool.Get().Navigate().GoToUrl(testServer);

            var searchPage  = new SearchPage();
            var resultsPage = new SearchResultsPage();

            searchPage
            .SelectSearchResultsDropList(25)
            .FillSearchTextbox("test")
            .ClickSearchButton();

            Assert.IsTrue(resultsPage.ResultsTableIsDisplayed());
        }
Exemplo n.º 4
0
        public void Screenshot()
        {
            DriverUtils.GoToUrl("http://192.168.200.198/i7251_12UI");
            Thread.Sleep(2000);
            var driver = DriverPool.GetDriver(TestNameResolver.GetCurrentTestName());

            driver.SwitchTo().Frame("main");
            DriverUtils.TypeInElement(By.Id("password"), "innovator");
            DriverUtils.TypeInElement(By.Id("username"), "admin");
            driver.FindElement(By.Id("login.login_btn_label")).Click();
            Thread.Sleep(1000);
            driver.SwitchTo().DefaultContent();
            Thread.Sleep(2000);

            DriverUtils.CaptureScreenShot("Innovator");
            //  var diff = Compare(
            //   @"C:\Users\kapatsevich\Desktop\Screenshots\GoogleLogo.png",
            //@"C:\Users\kapatsevich\Desktop\Screenshots\logo original.png");
        }
Exemplo n.º 5
0
 public void OneTimeTearUp()
 {
     DriverPool.DisposeAllDrivers();
 }
Exemplo n.º 6
0
 public void TearDown()
 {
     DriverPool.DisposeDriver(GetCurrentTestName());
     SoftAssert.PrintResults();
     //AssertsPool.PrintAsserts(GetCurrentTestName());
 }
Exemplo n.º 7
0
 public void SetUp()
 {
     DriverPool.RegisterDriver(GetCurrentTestName(), InitializeClient());
     //AssertsPool.RegisterTest(GetCurrentTestName());
 }
 protected override void OnTearDown()
 {
     DriverPool.CloseAll();
 }
Exemplo n.º 9
0
        public BasePage()
        {
            driver = DriverPool.Get();

            InitPage(this);
        }
Exemplo n.º 10
0
 public Context()
 {
     Driver        = DriverPool.Acquire();
     HtmlFileName  = Path.GetFullPath(BaseDirectory + Path.DirectorySeparatorChar + Guid.NewGuid() + ".html");
     ResultBuilder = new ResultBuilder();
 }