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); }
public void Cleanup() { DriverFactory.getInstance().removeDriver(); }