Java-client: Android Appium: org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=1}

Created on 15 Nov 2017  Â·  10Comments  Â·  Source: appium/java-client

Hi,

My set-up is:
appium server 1.7.0
java-client 5.0.4
selenium-server-standalone-3.0.0-beta1.jar or selenium-server-standalone-3.7.1.jar (began from 3.0.0beta, received Exception, tried to use newer version - the same exception)

Getting the same exception:
org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=1}

I've seen discussion here:
https://discuss.appium.io/t/org-openqa-selenium-webdriverexception-returned-value-cannot-be-converted-to-webelement/18608/30

Suggestion to downgrade jars is not welcomed in my case since I have few other projects that uses selenium driver and cannot downgrade it :(

Please, help

duplicate invalid

Most helpful comment

Here is my working version:
Appium 1.7.1
Java-client 5.0.4
Selenium 3.6.0

Hope it helps.

All 10 comments

Here is my working version:
Appium 1.7.1
Java-client 5.0.4
Selenium 3.6.0

Hope it helps.

@lubshilk
duplicate #727
Please make sure that you project doesn't depend on some old selenium version

@TikhomirovSergey

  1. I have no problem with the same setting on MacOS with IOS (I receive the exception on Windows for Android)
  2. I don't use POM

So, please, explain, how can I fix it in my case
Thanks

@ndndien
Thanks I'll try

Selenium 3.6.0 - do you mean "selenium standalone server" or "selenium serer"?

@ndndien
Many thanks, with your setting it works

re-run it with the newest jars:
Appium 1.7.1
Java-client 5.0.4
Selenium 3.7.1
Exception doesn't happen any more

Hi Frnds,

I found the solution, but cant explain how it works. But it works for me as a miracle.

Just add the below line, and magic happens. I dont have any idea how that makes it work..HAHAHA..

capability.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "60");

Hi ksurya,

capability.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "60");

This is not working for me. I am not understanding where i put this in my script.

Plz help me.

Add it in the Desired Capabilities instance before passing the
desiredCapabilityObject to the remotedriver/androiddriver.

On Sat, 23 Mar, 2019, 11:16 PM Vyankat16, notifications@github.com wrote:

Hi ksurya,

capability.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "60");

This is not working for me. I am not understanding where i put this in my
script.

Plz help me.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/appium/java-client/issues/768#issuecomment-475890261,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aey8ijMYSAjLqcUIIN9ZK1KcVYmImGIWks5vZmhsgaJpZM4Qewyc
.

Hi ksurya,

Can you share your mobile number?
If i need you then i will whatsapp you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romainlouvet picture romainlouvet  Â·  9Comments

vrunoa picture vrunoa  Â·  5Comments

waitshang picture waitshang  Â·  4Comments

Hi-Fi picture Hi-Fi  Â·  7Comments

ryltar picture ryltar  Â·  9Comments