Friday, May 30, 2014
Sunday, May 18, 2014
Thursday, May 15, 2014
How to download a Zip file into a Perticular Location
package FileDownloads;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
public class FileDownload {
public static void main(String[] args) throws InterruptedException {
FirefoxProfile Prof = new FirefoxProfile();
Thread.sleep(3000);
Prof.setPreference("browser.download.dir", "D:\\java prj");
Prof.setPreference("browser.download.folderList", 2);
Prof.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip");
WebDriver driver = new FirefoxDriver(Prof);
driver.get("http://www.bcfi.be/download/");
driver.manage().timeouts().implicitlyWait(3,TimeUnit.MINUTES);
driver.findElement(By.xpath("//*[@id='datatable']/tbody/tr[3]/td[3]/form/input")).click();
}
}
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
public class FileDownload {
public static void main(String[] args) throws InterruptedException {
FirefoxProfile Prof = new FirefoxProfile();
Thread.sleep(3000);
Prof.setPreference("browser.download.dir", "D:\\java prj");
Prof.setPreference("browser.download.folderList", 2);
Prof.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip");
WebDriver driver = new FirefoxDriver(Prof);
driver.get("http://www.bcfi.be/download/");
driver.manage().timeouts().implicitlyWait(3,TimeUnit.MINUTES);
driver.findElement(By.xpath("//*[@id='datatable']/tbody/tr[3]/td[3]/form/input")).click();
}
}
Tuesday, May 6, 2014
Subscribe to:
Posts (Atom)
TestNG - Can i use the 2 different data providers to same @test methods in TestNG?
public Object [][] dp1 () { return new Object [][] { new Object [] { "a" , "b" }, new Obje...
-
public Object [][] dp1 () { return new Object [][] { new Object [] { "a" , "b" }, new Obje...
-
package programs; public class CalculateSumOfNumbersOfArray { public int calculateSumOfNumbers(){ int[] a = {10,20,30,40}; int ...
-
package programs; import java.util.Scanner; public class ReverseNumber { public void reverseNumber(){ Scanner scn = new ...