@kazurayam I found a small issue in your code that’s causing this to not work as intended for OP. In your openChromeBrowserInIncognitoMode() method, when you add the incognito argument, you need 2 dashes. Here’s your current code snippet:
ChromeDriver openChromeBrowserInIncognitoMode() {
ChromeOptions options = new ChromeOptions()
options.addArguments("-incognito")
return openChromeBrowser(options);
}
It needs to be:
ChromeDriver openChromeBrowserInIncognitoMode() {
ChromeOptions options = new ChromeOptions()
options.addArguments("--incognito")
return openChromeBrowser(options);
}