You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: Cannot call non W3C standard command while in W3C mode #1242
On trying to create a new android session, i am seeing this message after the session gets created.
Unknown command: Cannot call non W3C standard command while in W3C mode
I don't see this issue if i remove the capability:
dc.setCapability(MobileCapabilityType.AUTO_WEBVIEW, true);
Switiching to webview works if i use driver.setContext() and i do not see W3C error.
But the error is seen with doesn't work with AutoWebview.
I am using java client 7.2.0 in this process
Environment
Appium version (or git revision) that exhibits the issue: v1.15.0-beta.1
Node.js version (unless using Appium.app|exe): v10.16.2
@mykola-mokhnach I am still waititng for the work around for now. As i mentioned above, if I am updating the dependency with master, the existing code is throwing compilation errors.
Sp i tried to update the following capability
MobileCapabilityType.FORCE_MJSONWP, true but it is also thwrowing the same error "Cannot call non W3C standard command while in W3C mode"
I am getting error class org.openqa.selenium.logging.LogEntries
and
org.openqa.selenium.internal.HasIdentity
class file for org.openqa.selenium.internal.HasIdentity not found
The only way we were able to work around this issue was by modifying the chromedriver source code for the latest chrome version, and building it ourselves. We then had to turn W3C mode off in the Chrome Options.
There was a code change between Chromedriver 75 and 76 which was the course for these issues. Reverting that block of code to the 75 version, and doing the above worked for us...
Reacted by Ahmad Sayeed, Ayaz Shahid, Mark Huang, Hasitha_Waruna, TomooMorikawa, datnq102, Lavritov Dmitry, Nikolaos Chachampis, AnkurSingh, lucas-neves and 8 more
Activity
mykola-mokhnach commentedon Sep 25, 2019
This is the bug of java client, which is fixed in the recent master, but is not published yet
mayureshshirodkar commentedon Sep 25, 2019
Thanks @mykola-mokhnach
mayureshshirodkar commentedon Sep 26, 2019
For anyone facing this issue. I have resolved it by using latest changes from the master branch of java client.
Using Maven:
roddymunro commentedon Sep 30, 2019
Is there an ETA on when the fix will be published?
Sourabh25 commentedon Oct 4, 2019
@mykola-mokhnach so what is the resolution as of today?
mykola-mokhnach commentedon Oct 4, 2019
Either use java client from master or enforce chromedriver to work in jsonwp mode
Sourabh25 commentedon Oct 4, 2019
So when I am trying to update the java client snapshot to master, I am getting the below errors while trying to compile the code
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/sroy107/git/CSAF/framework-core/src/main/java/com/comcast/utils/PageCore.java:[1473,33] cannot find symbol
symbol: method filter(java.util.logging.Level)
location: class org.openqa.selenium.logging.LogEntries
[ERROR] /Users/sroy107/git/CSAF/framework-core/src/main/java/com/comcast/uilocator/MobileObjRepoLocator.java:[130,114] cannot access org.openqa.selenium.internal.HasIdentity
class file for org.openqa.selenium.internal.HasIdentity not found
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Sourabh25 commentedon Oct 7, 2019
@mykola-mokhnach I am still waititng for the work around for now. As i mentioned above, if I am updating the dependency with master, the existing code is throwing compilation errors.
Sp i tried to update the following capability
MobileCapabilityType.FORCE_MJSONWP, true but it is also thwrowing the same error "Cannot call non W3C standard command while in W3C mode"
mayureshshirodkar commentedon Oct 7, 2019
@Sourabh25 does this work for you?
Sourabh25 commentedon Oct 7, 2019
@mayureshshirodkar no.
I am getting error class org.openqa.selenium.logging.LogEntries
and
org.openqa.selenium.internal.HasIdentity
class file for org.openqa.selenium.internal.HasIdentity not found
roddymunro commentedon Oct 7, 2019
The only way we were able to work around this issue was by modifying the chromedriver source code for the latest chrome version, and building it ourselves. We then had to turn W3C mode off in the Chrome Options.
There was a code change between Chromedriver 75 and 76 which was the course for these issues. Reverting that block of code to the 75 version, and doing the above worked for us...
mykola-mokhnach commentedon Oct 7, 2019
@roddymunro Wow, so complicated. How about
Sourabh25 commentedon Oct 7, 2019
@mykola-mokhnach i updated my pom to refer to master
com.github.appium
java-client
master-SNAPSHOT
I also set the w3c to false.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("clearSystemFiles", true);
capabilities.setCapability("platformName", platformName);
capabilities.setCapability("deviceName", deviceName);
capabilities.setCapability("platformVersion", platformVersion);
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Chrome");
capabilities.setCapability("w3c", true);
String broweserDir;
if(osName.contains("mac")) {
broweserDir = TestUtils.getRelativePath()+File.separator + "src/main/resources/BrowserSpecificDrivers/chromedriver";
}else {
broweserDir = TestUtils.getRelativePath()+File.separator + "src/main/resources/BrowserSpecificDrivers/chromedriver.exe";
}
But I am still getting the error
Cannot call non W3C standard command while in W3C mode
benken-parasoft commentedon Oct 7, 2019
This worked for me with ChromeDriver 76:
Sourabh25 commentedon Oct 7, 2019
@mykola-mokhnach @benken-parasoft my bad. I need to add it to the chromeoptions. It is working... thanks for all the help
vs111 commentedon Nov 1, 2019
don't forget to set capability.setCapability("newCommandTimeout", 0); in code else appium will close session after default time (60 sec).
hasithawaruna commentedon Nov 2, 2019
This worked for me (Y)
oldstone commentedon Jan 17, 2020
Hi @mykola-mokhnach does the recently released java client 7.3.0 have this fix?
rodicaDan commentedon Feb 28, 2020
Workaround in Python:
self.desired_caps["chromeOptions"] = {"w3c": False}
ankur1233 commentedon Apr 5, 2020
This work for me too. Thanks @roddymunro
Kajugul commentedon May 28, 2020
it works for me ..thnks.
LiorLPerfecto commentedon Feb 7, 2021
Using Android emulator with:
pixel 4
Android 11
Chromdriver 83
getting error: Cannot call non W3C standard command while in W3C mode
is there a fix for that ?
Not happening on android 10
Prashant150397 commentedon Oct 27, 2022
This worked for me........ thanks
trupti-salunkhe commentedon Mar 11, 2024
@roddymunro Thanks it worked for me...
capabilities.setCapability("appium:chromeOptions", ImmutableMap.of("w3c", false));