Sometimes, the browser window comes to the foreground and I'm clicking it accidentally which makes the test fails on some occasions. So, I just want to know, is there any way that I can keep the chrome driver window in the background.
Details: < ChromeDriver version: 2.28.455517 > < Chrome version: 58.0.3029.96 >
You can try using headless switch available for Chrome.
This will run the automation in the headless mode and you will not be disturbed.
Afterward, initiate Chrome.