0

I am using Serenity framework and getting the attached error at the start of every run. If I close or accept the box then my test successfully otherwise failed. I tried to handle this in serenity.conf file but didn't work for me. Please suggest or help me.

enter image description here

/////////// serenity.conf file /////////////////

webdriver {
  driver = chrome
  timeouts {
    implicitlywait = 3000 // milliseconds
  }
}

headless.mode = false

chrome.switches = """start-maximized;test-type;enable-automation;no-sandbox;ignore-certificate-errors;
                   disable-popup-blocking;disable-default-apps;disable-extensions;
                   file-access-check;incognito;disable-infobars;disable-gpu;disable-dev-shm-usage;
           headless;"""

chrome_experimental_options.useAutomationExtension = "false"


serenity {
  restart.browser.for.each = feature
  # take.screenshots = FOR_FAILURES
  browser.maximized = "true"
}

driver_capabilities {
  iexplorer {
    ignoreProtectedModeSettings = "true"
    nativeEvents = "true"
  }
}

drivers {
  windows {
    webdriver.ie.driver = src/test/resources/drivers/windows/IEDriverServer.exe
    webdriver.chrome.driver = src/test/resources/drivers/windows/chromedriver.exe
  }
  linux {
    webdriver.chrome.driver = src/test/resources/drivers/linux/chromedriver
  }
}
0

Anytime I see 'experimental options' I'm leery to give an answer, but it looks like you're using ChromeDriver in an enterprise environment that doesn't allow for the installation of extensions to the browser. I had the same issue and turned off extension like you have and it got around the problem. There are registry changes you could make as well to allow extensions to load, but more than likely they would get overwritten the next time you boot by the admin's login script, and changing the registry frowned upon by most Companies, and rightly so :-)

I added the following option to spin up an instance of Chromedriver with extensions off (Ruby) and it worked like a champ:

@browser = Watir::Browser.new :chrome, options: {options: {'useAutomationExtension' => false}

Also keep in mind because of W3C.org recommendations the Chrome Browser and Driver versions need to match.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.