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?