-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot call non W3C standard command while in W3C mode #4073
Comments
This is not an issue with chrome, but an issue in how you specify the options. Chrome 75 is by default W3C compliant and you must set W3C to false to be able to use the JSONWP (as mentioned in the release notes) Try providing the options like 'goog:chromeOptions': {
'w3c': false,
args: ["--headless", "--window-size=1366,768"]
}, Closing this for now as it is an issue with how you define the options instead of an issue with WebdriverIO. |
@wswebcreation Thanks you're right. Can you just point me to the release notes I can't seem to find where it says to set W3C to false. Thanks |
Previously, `AddChrome` would quietly override `W3C` to `true`, even if you wanted it to be `false`. Due to a problem with Chrome, the W3C standard, and `elementIsDisplayed`, it is necessary to be able to disable W3C mode for Chrome so that we can call `IsDisplayed`. This behavior appears to have started around Chrome 75. See: * https://stackoverflow.com/questions/56111529/cannot-call-non-w3c-standard-command-while-in-w3c-mode-seleniumwebdrivererr * webdriverio/webdriverio#4073
@wswebcreation if I could thumbs up your comment 100 times I would. I'm coming from NightwatchJS and have been investigating this error for 2 days. I was trying to run headless chromedriver in dockerized selenium hub. Adding that snippet to my
|
Works around newer Chrome releases enabling W3C mode by default. See webdriverio/webdriverio#4073
Works around newer Chrome releases enabling W3C mode by default. See webdriverio/webdriverio#4073
Environment (please complete the following information):
Config of WebdriverIO
An example of how you configured WebdriverIO config
Describe the bug
Since upgrading Chrome and ChromeDriver I'm getting the following error:
Error: Promise was rejected with the following reason: unknown command: Cannot call non W3C standard command while in W3C mode at elementIdDisplayed("e88a07f5-2ca3-42ad-b458-3d66797b37f0") - isVisible.js:71:55
If you look at the changes for ChromeDriver 75.0.3770.8 http://chromedriver.chromium.org/downloads
you will see it mentions "The most noticeable change is ChromeDriver now runs in W3C standard compliant mode by default. "
I've managed to get around this by specifying
w3c: false
inChromeOptions
however I don't think this is the right approach. It would seem there's something somewhere that's calling a "non w3c standard" command and I'm assuming it's somewhere in webdriverio.To Reproduce
Setup a test environment with the above details and run npm test.
Expected behavior
Tests should run without the error
Cannot call non W3C standard command while in W3C mode
The text was updated successfully, but these errors were encountered: