java-client icon indicating copy to clipboard operation
java-client copied to clipboard

Returned value cannot be converted to WebElement

Open gepsl opened this issue 7 years ago • 23 comments

Description

I want to run selenium tests on Android device and I'm using Appium. Using chomedriver 74 version and chrome version 75 everything working correctly, but after update chrome to version 76, I had to change chromedriver to 76 version and I have an error. Tests starts, but after WebDriverWait.until(ExpectedConditions.invisibilty or visibility) fails. It sems that tests correctly waiting for invisibilty of element, but when it disappear error is ocurred:

Environment

  • java client build version : 7.2.0 and 7.1.0
  • Appium server version: 1.14.2 and 1.14.0
  • Desktop OS/version: Windows 10 and Linux
  • Mobile platform: Android
  • Real device : Huawei P10 and Xiaomi Mi8

Code

        WebDriverWait wait = new WebDriverWait(webDriver, time);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));

Ecxeption stacktraces

java.lang.AssertionError: Waiting for WebElement 'INIT SYNC POPUP' to be invisible failed

java.lang.AssertionError: Waiting for WebElement 'INIT SYNC POPUP' to be invisible failed

at org.testng.Assert.fail(Assert.java:85) at Application.Helpers.Assert.fail(Assert.java:11) at Application.Helpers.ElementWeb.waitToBecomeInvisible(ElementWeb.java:219) at Application.Pages.Application.Home.waitForSynchronize(Home.java:67) at Application.ApplicationTest.loginAndSynchronize(ApplicationTest.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133) at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:584) at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172) at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804) at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.testng.TestRunner.privateRun(TestRunner.java:770) at org.testng.TestRunner.run(TestRunner.java:591) at org.testng.SuiteRunner.runTest(SuiteRunner.java:402) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355) at org.testng.SuiteRunner.run(SuiteRunner.java:304) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180) at org.testng.TestNG.runSuitesLocally(TestNG.java:1102) at org.testng.TestNG.runSuites(TestNG.java:1032) at org.testng.TestNG.run(TestNG.java:1000) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) Caused by: org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {message=no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class='loading-wrapper']"} (Session info: chrome=76.0.3809.111) (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Windows NT 10.0.17763 x86_64)} Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'CPX-EHN1NDZU8OH', ip: '172.28.64.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201' Driver info: driver.version: AppiumDriver at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:333) at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:61) at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:428) at io.appium.java_client.DefaultGenericMobileDriver.findElementByXPath(DefaultGenericMobileDriver.java:151) at io.appium.java_client.AppiumDriver.findElementByXPath(AppiumDriver.java:1) at org.openqa.selenium.By$ByXPath.findElement(By.java:353) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315) at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:57) at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1) at org.openqa.selenium.support.ui.ExpectedConditions$20.apply(ExpectedConditions.java:577) at org.openqa.selenium.support.ui.ExpectedConditions$20.apply(ExpectedConditions.java:573) at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249) at Application.Helpers.ElementWeb.waitToBecomeInvisible(ElementWeb.java:207) ... 29 more Caused by: java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:331) ... 42 more

Link to Appium logs

https://gist.github.com/GerardLarwa/49833fad87cbcdedd0a8a349aeca32af

gepsl avatar Aug 26 '19 12:08 gepsl

this is fixed in appium@beta

mykola-mokhnach avatar Aug 26 '19 12:08 mykola-mokhnach

I receive "Cannot call non W3C standard command while in W3C mode". Should I switch to another mode or change standard?

gepsl avatar Aug 26 '19 12:08 gepsl

Please provide the full server log

mykola-mokhnach avatar Aug 26 '19 12:08 mykola-mokhnach

Server logs: https://gist.github.com/GerardLarwa/35678fc6ec9f8b1393b7243dc6c968cb

gepsl avatar Aug 26 '19 12:08 gepsl

this is a server issue and I'll do the necessary fixes soon. For now you could set the w3c key to false in chromeOptions to fall back to MJSONWP. I would be grateful if you could later test my fix to W3C

mykola-mokhnach avatar Aug 26 '19 12:08 mykola-mokhnach

Actually, this might be a client issue as well - the getSession command does not exist for w3c.

mykola-mokhnach avatar Aug 26 '19 12:08 mykola-mokhnach

[W3C (d92eeb6b)] Driver proxy active, passing request on via HTTP proxy [debug] [WD Proxy] Matched '/wd/hub/session/d92eeb6b-915c-42a6-a90c-25485ede3769' to command name 'getSession' [debug] [WD Proxy] Proxying [GET /wd/hub/session/d92eeb6b-915c-42a6-a90c-25485ede3769] to [GET http://127.0.0.1:8000/wd/hub/session/3356292a9bd98dcc685e790e94df8eb1] with body: {} [debug] [WD Proxy] Got response with status 404: {"value":{"error":"unknown command","message":"unknown command: Cannot call non W3C standard command while in W3C mode","stacktrace":"Backtrace:\n\tOrdinal0 [0x00E97C93+1473683]\n\tOrdinal0 [0x00E1ADB1+961969]\n\tOrdinal0 [0x00DA42E3+475875]\n\tOrdinal0 [0x00D40C2C+68652]\n\tOrdinal0 [0x00D41BF0+72688]\n\tOrdinal0 [0x00D41B89+72585]\n\tOrdinal0 [0x00E34B77+1067895]\n\tGetHandleVerifier [0x00F36875+506677]\n\tGetHandleVerifier [0x00F36610+506064]\n\tGetHandleVerifier [0x00F3D1B8+533624]\n\tGetHandleVerifier [0x00F3704A+508682]\n\tOrdinal0 [0x00E2C266+1032806]\n\tOrdinal0 [0x00E2C0DF+1032415]\n\tOrdinal0 [0x00E36A8B+1075851]\n\tOrdinal0 [0x00E36BF3+1076211]\n\tOrdinal0 [0x00E35BA5+1072037]\n\tBaseThreadInitThunk [0x74F40419+25]\n\tRtlGetAppContainerNamedObjectPath [0x76FE662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x76FE65FD+189]\n"}} [debug] [W3C (d92eeb6b)] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: 404 - "{"value":{"error":"unknown command","message":"unknown command: Cannot call non W3C standard command while in W3C mode","stacktrace":"Backtrace:\n\tOrdinal0 [0x00E97C93+1473683]\n\tOrdinal0 [0x00E1ADB1+961969]\n\tOrdinal0 [0x00DA42E3+475875]\n\tOrdinal0 [0x00D40C2C+68652]\n\tOrdinal0 [0x00D41BF0+72688]\n\tOrdinal0 [0x00D41B89+72585]\n\tOrdinal0 [0x00E34B77+1067895]\n\tGetHandleVerifier [0x00F36875+506677]\n\tGetHandleVerifier [0x00F36610+506064]\n\tGetHandleVerifier [0x00F3D1B8+533624]\n\tGetHandleVerifier [0x00F3704A+508682]\n\tOrdinal0 [0x00E2C266+1032806]\n\tOrdinal0 [0x00E2C0DF+1032415]\n\tOrdinal0 [0x00E36A8B+1075851]\n\tOrdinal0 [0x00E36BF3+1076211]\n\tOrdinal0 [0x00E35BA5+1072037]\n\tBaseThreadInitThunk [0x74F40419+25]\n\tRtlGetAppContainerNamedObjectPath [0x76FE662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x76FE65FD+189]\n"}}" [debug] [W3C (d92eeb6b)] at JWProxy.proxy (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:233:13) [debug] [W3C] Matched W3C error code 'unknown command' to UnknownCommandError [HTTP] <-- GET /wd/hub/session/d92eeb6b-915c-42a6-a90c-25485ede3769 404 87 ms - 848

mykola-mokhnach avatar Aug 26 '19 13:08 mykola-mokhnach

I have same issue with appium 1.8.1 , java client 5.0.1 and android 4.4.4

HoLeAnh avatar Aug 26 '19 14:08 HoLeAnh

So, should I downgrade java-client to 7.1.0 or there is any other workaround?

gepsl avatar Aug 26 '19 15:08 gepsl

The workaround would be to add w3c: false capability to chromeOptions

mykola-mokhnach avatar Aug 26 '19 16:08 mykola-mokhnach

I'm trying do this by below comamnds:

    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.setExperimentalOption("w3c", "false");
    desiredCapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
    webDriver = new AppiumDriver(url, desiredCapabilities);

chromeOptions.addArguments("w3c", "false"); also not working

Trying below also didn't help

    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.addArguments("w3c", "false");
    chromeOptions.merge(desiredCapabilities);
    webDriver = new AppiumDriver(url, chromeOptions);

Selenium Server logs: https://gist.github.com/GerardLarwa/0e317aa681e0388c8f5f75f16e7970e7 Appium server logs: https://gist.github.com/GerardLarwa/57c8a2d705204f206011de2fbf41887f

And I receive error:

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Error forwarding the new session cannot find : Capabilities {appActivity: com.Application.androidsdk.p..., appPackage: com.pg.Application1718PwC365, autoWebview: true, automationName: UiAutomator2, browserName: chrome, deviceName: MI_8, goog:chromeOptions: {args: [], extensions: [], w3c: false}, platformName: android, platformVersion: 9, systemPort: 8201, udid: 70c1210f} Command duration or timeout: 261 milliseconds Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'CPX-EHN1NDZU8OH', ip: 'xx.xx.xx.xx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201' Driver info: driver.version: AppiumDriver

at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:323) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:86) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:96) at Application.SeleniumConfiguration.ApplicationBaseConf.setup(ApplicationBaseConf.java:38) at Application.ApplicationTest.beforeEachTest(ApplicationTest.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62) at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340) at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294) at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:623) at org.testng.TestRunner.beforeRun(TestRunner.java:613) at org.testng.TestRunner.run(TestRunner.java:584) at org.testng.SuiteRunner.runTest(SuiteRunner.java:402) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355) at org.testng.SuiteRunner.run(SuiteRunner.java:304) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180) at org.testng.TestNG.runSuitesLocally(TestNG.java:1102) at org.testng.TestNG.runSuites(TestNG.java:1032) at org.testng.TestNG.run(TestNG.java:1000) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186) ... 36 more Caused by: org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities {appActivity: com.Application.androidsdk.p..., appPackage: com.pg.Application1718PwC365, autoWebview: true, automationName: UiAutomator2, browserName: chrome, deviceName: MI_8, goog:chromeOptions: {args: [], extensions: [], w3c: false}, platformName: android, platformVersion: 9, systemPort: 8201, udid: 70c1210f} Command duration or timeout: 261 milliseconds at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$errorHandler$0(JsonWireProtocolResponse.java:54) at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) ... 41 more Caused by: org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find : Capabilities {appActivity: com.Application.androidsdk.p..., appPackage: com.pg.Application1718PwC365, autoWebview: true, automationName: UiAutomator2, browserName: chrome, deviceName: MI_8, goog:chromeOptions: {args: [], extensions: [], w3c: false}, platformName: android, platformVersion: 9, systemPort: 8201, udid: 70c1210f} Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'CPX-EHN1NDZU8OH', ip: 'xx.xx.xx.xx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201' Driver info: driver.version: unknown at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:118) at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:85) at org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:865) at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:146) at org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548) at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1340) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1242) at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:144) at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.seleniumhq.jetty9.server.Server.handle(Server.java:503) at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:364) at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:260) at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:103) at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) at java.lang.Thread.run(Unknown Source)

gepsl avatar Aug 26 '19 16:08 gepsl

nope, it won't work this way. You shouldn't use the ChromeOptions wrapper, simply set the chromeOptions capability for appium (it should have the appium: prefix though)

mykola-mokhnach avatar Aug 26 '19 17:08 mykola-mokhnach

I'm trying add this to my nodeconfig but still occurring error "Cannot call non W3C standard command while in W3C mode" . In Appium logs can see that Appium server using W3C capabilities. What I'm doing wrong?

Appium logs: https://gist.github.com/GerardLarwa/f913989ce3f00febbb849de7bcbb76ea

Node config:

{ "capabilities": [ { "platformName": "Android", "udid": "70c1210f", "platformVersion": "9", "deviceName": "MI_8", "maxInstances": 1, "appPackage": "com.pg.Application1718PwC365", "appActivity": "com.app.androidsdk.phonegap.ui.ApplicationGapActivity", "systemPort":8201, "appium:chromeOptions": { "w3c" : false } } ], "configuration": { "cleanUpCycle":2000, "timeout":30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": 1, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "xx.xx.xx.xx", "hubProtocol": "http" } }

gepsl avatar Aug 26 '19 21:08 gepsl

In the recent log I don't observe that chromeOptions cap is passed anywhere. Are you sure the correct config is used?

mykola-mokhnach avatar Aug 27 '19 05:08 mykola-mokhnach

Yep, I'm sure, What's more, this cap is visible in selenium server logs, when starting session.

C:\Users\user\OneDrive - xxxxxxxxx\Scripts_home>java -jar C:\selenium.jar -role hub 07:55:15.552 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358 07:55:20.851 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444 2019-08-27 07:55:21.463:INFO::main: Logging initialized @6416ms to org.seleniumhq.jetty9.util.log.StdErrLog 07:55:23.666 INFO [Hub.start] - Selenium Grid hub is up and running 07:55:23.666 INFO [Hub.start] - Nodes should register to http://xx.xx.xx.xx:4444/grid/register/ 07:55:23.666 INFO [Hub.start] - Clients should connect to http://xx.xx.xx.xx:4444/wd/hub 07:55:50.450 INFO [DefaultGridRegistry.add] - Registered a node http://0.0.0.0:4743 07:58:32.305 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {appActivity: com.Application.androidsdk.p..., appPackage: com.pg.Application1718PwC365, autoWebview: true, automationName: UiAutomator2, deviceName: MI_8, platformName: android, platformVersion: 9, systemPort: 8201, udid: 70c1210f} 07:58:32.305 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {appActivity=com.Application.androidsdk.phonegap.ui.ApplicationDroidGapActivity, appPackage=com.pg.Application1718PwC365, server:CONFIG_UUID=0cf7af1a-cf1a-4658-808a-ec540c650455, seleniumProtocol=WebDriver, platformVersion=9, appium:chromeOptions={w3c=false}, maxInstances=1, platformName=Android, udid=70c1210f, deviceName=MI_8, platform=ANDROID, systemPort=8201}

gepsl avatar Aug 27 '19 06:08 gepsl

So, how can I make it working?

gepsl avatar Aug 27 '19 08:08 gepsl

I have merged the fix to java client. It can be tested using jitpack.io (commit hash is 1e80399ec649606d4ebf8330250cc4782168704b). See https://github.com/appium/java-client for more details.

mykola-mokhnach avatar Aug 27 '19 11:08 mykola-mokhnach

Thanks. Good job. It seems to be working. I'll test that solution and let you know if I find any errors.

gepsl avatar Aug 27 '19 12:08 gepsl

Please create a new problem report if you observe any new issues there related to the protocol change

mykola-mokhnach avatar Aug 27 '19 12:08 mykola-mokhnach

Thanks. Good job. It seems to be working. I'll test that solution and let you know if I find any errors.

Hi I have the same issue as yours .Could you please help me with how to use the jitpack.io ? when i add the maven dependency it is throwing error for keyword

reddyVara avatar Oct 11 '19 01:10 reddyVara