Ejemplo 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";
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            IWebDriver driver = DriverFactory.getInstance().getDriver();

            driver.Manage().Window.Maximize();
            driver.Url = "https://ps.uci.edu/~franklin/doc/file_upload.html";
        }
Ejemplo n.º 3
0
        public void TestMethod4()
        {
            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);
        }
Ejemplo n.º 4
0
 public void Cleanup()
 {
     DriverFactory.getInstance().removeDriver();
 }