public class Tester implements Runnable {
public Tester() {
// Init WebDriver
FirefoxProfile firefoxProfile = new FirefoxProfile();
WebDriver browser1 = new FirefoxDriver(firefoxProfile);
WebDriver browser2 = new FirefoxDriver(firefoxProfile);
}
public static void main(String[] args) {
Runnable tester = new Tester();
Thread worker1 = new Thread(tester);
Thread worker2 = new Thread(tester);
worker1.start();
worker2.start();
}
public void run(WebDriver driver) {
login(driver, "username", "password", "http://someurl.com/login");
}
}
I am trying to pass the driver argument to run() method, but does it take arguments ? Where do I pass the browser1 and browser 2 ?
My end goal is to have multiple instances of firefox browser running the same tests.