1

I was trying to add chrome.capabilities.acceptInsecureCerts=true; into serenity.conf file. It did override that value. However, now executing is failing with below errors.

Caused by: org.openqa.selenium.InvalidArgumentException: 
invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: cannot parse capability: acceptInsecureCerts
from invalid argument: must be a boolean 

I also tried adding capabilities by overriding WebDriver with below codes. Still didn't work:

    @Override
public WebDriver newDriver() {
    try {
        ChromeOptions options = new ChromeOptions();
        options.setAcceptInsecureCerts(true);

        DesiredCapabilities capabilities = DesiredCapabilities.chrome();
        capabilities.setCapability(ChromeOptions.CAPABILITY, options);
        capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
        capabilities.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
        capabilities.setAcceptInsecureCerts(true);
        return new ChromeDriver(options);
    } catch (Exception e) {
        throw new Error(e);
    }
}
ASM
  • 709
  • 2
  • 8
  • 27

1 Answers1

1

For me it worked with the property chrome.capabilities.acceptInsecureCerts=true. Maybe you just have to remove ";" at the end of your property. It expects a boolean, but it gets a string instead "true;".