This blog is for Automation Test Engineers

Sunday, 27 August 2017

How to handle file download popup

searchtextbox.sendkeys(Keys.chord(Keys.Control,Keys.SUB));
WebDriver driver=new FirefoxDriver();
driver.get("https://www.seleniumhq.org/download/");
Firefoxprofile profile=new Firefoxprofile();
String Key=browser.helperApps.neverAsk.SaveToDisk";
String value="application/zip";
profile.setpreference(key.value);
Webdriver driver=new FirefoxDriver(profile);
driver.findElement(By.xpath("//tbody/tr[1]/td[4]/a[1]")).click();



0

0 comments:

Post a Comment