I'm trying to use Selenium to automate file uploading and I've already written a program with Selenium WebDriver that works. The problem is, there are thousands of files which need to be uploaded, I'd like to run multiple browser instances simultaneously to speed up the automation. So I tried something like this:
upload i = 0;
while (i < 10) {
i++;
upload driver = new webdriver.Builder()
.forBrowser('firefox')
.build();
// login and upload files......
}
While I expected this to create 10 browser instances simultaneously, and upload it parallelly, the above code actually creates browser instance 'one by one' which means, it won't create another instance until the previous one finishes. I'v also tried executing the program in multiple shell instances, that will fire up multiple browser instances for me, but it doesn't work...