Monday 21 November 2011

Upload a file using selenium webdriver with CSharp


driver.Navigate().GoToUrl("http://www.freeonlinephotoeditor.com/");
IWebElement element=driver.FindElement(By.Id("file"));
element.SendKeys("d:\\anji.jpg");       //path of a file
driver.FindElement(By.Name("upload")).Click();

No comments:

Post a Comment