0

I am trying to get codeceptions acceptance tests running with WebDriver. My current setup is the following:

  • Arch Linux
  • Chromium: Chromium 75.0.3770.80 Arch Linux
  • The included chromedriver-version: ChromeDriver 75.0.3770.80 (9a9aa15057b6b2cc0909bdcf638c0b65ecd516f2-refs/branch-heads/3770@{#948})
  • Selenium Server: Selenium server version: 3.14.0, revision: aacccce0

I am executing selenium by running env webdriver.chrome.driver="chromedriver" java -jar /usr/share/selenium-server/selenium-server-standalone.jar -port 5555 & When I run the acceptance tests however, I get the error [PHPUnit\Framework\Exception] Undefined index: ELEMENT for every test. Chromium starts correctly, loads the currect url but is unable to do anything else.

I researched the problem and found out, that there was a similar issue with geckodriver in the past. It could be fixed by passing -enablePassThrough false to selenium. The passthrough-mode was removed in selenium 3.9 however. The fix here was to simply switch to chromedriver. As I am already using chromedriver however, this doesn't work for me. Is it possible, that chromium doesn't support the w3c-specs? Is there any difference between Chromium and Chrome regarding support of Selenium?

The output of selenium: starting selenium:

11:39:58.474 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revi
11:39:58.478 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 5555
2019-06-07 11:39:58.689:INFO::main: Logging initialized @558ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:39:58.895 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5555

starting codeception-tests

11:40:24.577 INFO [ActiveSessionFactory.apply] - Capabilities are: {
  "browserName": "chrome",
  "chromeOptions": {
    "args": [
      "--disable-gpu"
    ]
  }
}
11:40:24.580 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server
Starting ChromeDriver 75.0.3770.80 (9a9aa15057b6b2cc0909bdcf638c0b65ecd516f2-refs/branch-heads/3770@{#948})
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
11:40:26.065 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
11:40:26.130 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session 0c80ffc4e6c160d2817ab60ced6a279f (org.openqa.selenium.chrome.ChromeDriverService)

The acceptance tests should be fine as they run fine in my CI-Pipeline

1 Answer 1

1

The php-webdriver library does not support w3c mode yet. You could pass w3c: false as a required capability to get legacy behaviour,
but a more reliable option is to use ChromeDriver v74.

More information can be found in this ticket https://github.com/facebook/php-webdriver/issues/469#issuecomment-499519728

Update: upgrading facebook/webdriver library to 1.7.0 version should fix this issue too.

Sign up to request clarification or add additional context in comments.

1 Comment

Downgrading to v74 fixed it for me, thanks! Could you probably include an example-configuration for codeception on using the w3c-option? I wasn't able to get that running. That might help people without the option to downgrade.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.