I am using Selenium for testing. I noticed a different behavior starting Chrome manually and starting it with selenium. After a lot of investigation I broke the problem down to JavaScript's window.chrome.runtime which is undefined if started with selenium.
After some research on Google I have found people facing similar issues, but none of their solutions worked for me.
I have tried so far to remove the test-type switch:
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Arrays.asList("test-type"));
Are there any other ways I can make it work?
Answer which did the job for me was at https://groups.google.com/forum/#!topic/chromedriver-users/7wF9EHF2jxQ
Code snippet:
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Arrays.asList("test-type"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With