Inform a value of a list in serenity.properties, the property is not beign identified by serenity.
Example of property:
chrome_experimental_options.excludeSwitches=[enable-automation]
chrome_experimental_options.useAutomationExtension=false
Error returned:
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (invalid argument: entry 0 of 'firstMatch' is invalid from invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: cannot parse excludeSwitches from invalid argument: must be a list
I still can't reproduce this in 2.0.71. Can you provide a sample project?
I created a new project to test it, but, this one can only shows the message of "chrome is being controlled by automated software" still appear when chromeDriver starts.
I will take a look in my actual project to identify why I am still getting invalid argument: must be a list, by the way configuring the property on serenity.properties seems to not work.
Can you post the code that works with a custom driver?
options.setExperimentalOption("excludeSwitches", Arrays.asList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
Try adding the following:
use.chrome.automation.options = false
Using this properties:
#chrome_experimental_options.excludeSwitches=[enable-automation]
chrome_experimental_options.useAutomationExtension=false
chrome.switches=--enable-automation --safebrowsing-disable-download-protection --disable-infobars --auto-ssl-client-auth --allow-running-insecure-content --allow-unchecked-dangerous-downloads --safebrowsing-disable-extension-blacklist --disable-extensions --disable-popup-blocking --lang=pt-BR
use.chrome.automation.options=false
Still getting the same result.
Here is what I have found to work:
In the properties file:
use.chrome.automation.options = false
chrome_experimental_options.excludeSwitches=[enable-automation]
In serenity.conf:
use.chrome.automation.options = false
chrome_experimental_options {
excludeSwitches="[enable-automation]"
useAutomationExtension=false
}
Well,
I don't know why, but, for me still appearing the message of running by automated test.
I tried with:
use.chrome.automation.options = false
chrome_experimental_options.excludeSwitches=[enable-automation]
chrome_experimental_options.useAutomationExtension=false
chrome.switches=--enable-automation --safebrowsing-disable-download-protection --disable-infobars --auto-ssl-client-auth --allow-running-insecure-content --allow-unchecked-dangerous-downloads --safebrowsing-disable-extension-blacklist --disable-extensions --disable-popup-blocking --lang=pt-BR
use.chrome.automation.options=false
chrome_experimental_options.excludeSwitches=[enable-automation]
chrome.switches=--enable-automation --safebrowsing-disable-download-protection --disable-infobars --auto-ssl-client-auth --allow-running-insecure-content --allow-unchecked-dangerous-downloads --safebrowsing-disable-extension-blacklist --disable-extensions --disable-popup-blocking --lang=pt-BR
I am using ChromeDriver v77
@jacquecosta there is a new serenity version 2.0.73 was released several days ago and looks like the issue was fixed.
Can you try to reproduce it with these params:
chrome_experimental_options.useAutomationExtension=false
chrome_experimental_options.excludeSwitches=[enable-automation]
The issue with the properties file being like this
use.chrome.automation.options = false
chrome_experimental_options.excludeSwitches=[enable-automation]
is that it expects the excludeSwitches property to be a list, but it isn't parsed as one.
I will raise a pull request if thats helpful?
Have raised PR1862
Hi @wakaleo , @sparmboy I tried with the suggested serenity properties changes, in the above thread and still see the Chrome Bar at the top of the browser launched. please let me know if there is any update on this issue. I would be happy to incorporate it in my framework
Hi @MohammedWaasim, you can try with chrome_experimental_options.excludeSwitches=enable-automation (without square brackets). It should work. Just make sure your chrome driver is updated one.
Hi @MohammedWaasim, you can try with chrome_experimental_options.excludeSwitches=enable-automation (without square brackets). It should work. Just make sure your chrome driver is updated one.
Yes this works :), thanks a lot
Most helpful comment
Hi @MohammedWaasim, you can try with chrome_experimental_options.excludeSwitches=enable-automation (without square brackets). It should work. Just make sure your chrome driver is updated one.