How to upload a file using webdriver
Solution: Dealing
with Dialog Box:
magic 1:
driver.findElementByLinkText("Upload Files").click();
driver.setLogLevel(Level.ALL);
System.out.println(driver.getCurrentUrl());
WebElement
element = driver.findElement(By.xpath("//input[@name='file_1']"));
LocalFileDetector
detector = new LocalFileDetector();
String path = "D://test66T.txt";
File f =
detector.getLocalFile(path);
((RemoteWebElement)element).setFileDetector(detector);
element.sendKeys(f.getAbsolutePath());
driver.findElementByXPath("//html/body/div[9]/div[1]/a/span").click();
Is LocalFileDector supported in the C# bindings?
ReplyDeletethank for you information your blog isa excellent any problem sovle this movement
ReplyDeleteonce visit selenium free course online trainings
Selenium training in Chennai
ReplyDeleteWe provide best selenium training in Chennai with real time scenarios.For real time training reach us 8122241286 and become experts in selenium.
selenium training in chennai
Thanks for sharing this information and keep updating us. This is informatics and really useful to me.
ReplyDeleteSelenium Training in Chennai | Selenium Training | Selenium Course in Chennai
I have enjoyed the learning lesion and I regret to have missed the previous lesson. I will, therefore, bookmark this site so that I can take part in the upcoming lessons. Thanks so much for sharing with us educative and informative articles and other learning materials and information can be obtained by clicking on PhD Thesis Help.
ReplyDeleteIs there a solution for c# as well?
ReplyDeleteAwesome post. Really thanks for sharing such a valuable information. Keep updating like this ��. I t was very useful for me.
ReplyDeleteBest Selenium Training Institute In Hyderabad | Online Selenium Training
Thank you for sharing such a valuble information
ReplyDeletebest sap simple finance online training institute in hyderabad