Exemplo n.º 1
0
        public void Setup()
        {
            IWebDriver driver = DriverFactory.getInstance().getDriver();

            driver.Manage().Window.Maximize();
            driver.Url = "http://www.csm-testcenter.org/test?do=show&subdo=common&test=file_upload";
        }
Exemplo n.º 2
0
        public void TestMethod5()
        {
            IWebDriver driver = DriverFactory.getInstance().getDriver();

            driver.FindElement(By.CssSelector("input[name='file_upload']")).SendKeys(@"C:\Users\antwan.maddox\source\repos\ThreadSafeProject\ThreadSafeProject\Files\" + "UsingXPath.pdf");
            driver.FindElement(By.CssSelector("input[type='submit']")).Click();
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));

            wait.PollingInterval = TimeSpan.FromMilliseconds(500);
            bool value = wait.Until(drv => drv.FindElement(By.XPath("//*[text()='File Upload Finished']")).Displayed == true);

            Assert.IsTrue(value);
        }
Exemplo n.º 3
0
 public void Cleanup()
 {
     DriverFactory.getInstance().removeDriver();
 }