Hi All,
When trying to run chrome driver , while i am able to launch multiple copies of chrome almost instantly , total time from launch to navigate action takes a long time which is directly related to number of instance i have launched in parallel.
I need to run my test cases on multiple instance of chrome at the same time[10-15 instances or even more]. While Slow chrome launch/navigation is unacceptable , high CPU usage by chrome does not allow me to continue smoothly with my test cases. Any help in these two areas would be appreciated.
Observations:
Single instance launch + Navigate : 3993 ms
Two instances launch + Navigate : 6102 ms
Three instances launch + Navigate : 14685 ms
Four instances launch + Navigate : 16125 ms
and so on. Also , CPU usage increased to 100%[usage by chrome as seen in task manager] when number of chrome instances launched by chrome driver are 3 or more in my case.
Sample code to reproduce issue [C# console project ] :
static void Main(string[] args)
{
Parallel.For(1, n, i =>
{
IWebDriver driver = new ChromeDriver(@"D:\SeleniumDrivers");
driver.Navigate().GoToUrl("http://www.bing.com");
});
}
Run for various values of "n>=2" and see the difference in time it takes to navigate all instances of chrome that has been launched.Also, observe the CPU utilization of chrome instances launched by chrome driver.
Environment details:
OS : Windows 8 Enterprise (64-bit)
Chrome version : 44.0.2403.89 m (64-bit)
WebDriver version : 2.46
ChromeDriver version : 2.15.322448
Regards,
Nish26