package com.prac;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ParallelExe {
public static void main(String...strings ){
Thread fireFoxThread=new Thread(new Runnable() {
public void run() {
// TODO Auto-generated method stub
WebDriver driver=new FirefoxDriver();
driver.get("http://www.google.com");
}
});
Thread chromeThread=new Thread(new Runnable() {
public void run() {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "D:\\Users\\browserdrivers\\chromedriver.exe");
WebDriver driver1 = new ChromeDriver();
driver1.get("http://www.amazon.com");
}
});
fireFoxThread.start();
chromeThread.start();
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ParallelExe {
public static void main(String...strings ){
Thread fireFoxThread=new Thread(new Runnable() {
public void run() {
// TODO Auto-generated method stub
WebDriver driver=new FirefoxDriver();
driver.get("http://www.google.com");
}
});
Thread chromeThread=new Thread(new Runnable() {
public void run() {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "D:\\Users\\browserdrivers\\chromedriver.exe");
WebDriver driver1 = new ChromeDriver();
driver1.get("http://www.amazon.com");
}
});
fireFoxThread.start();
chromeThread.start();
}
}
No comments:
Post a Comment