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

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

Open lubshilk opened this issue 9 years ago • 10 comments

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

lubshilk avatar Nov 15 '17 11:11 lubshilk

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

Hope it helps.

ndndien avatar Nov 15 '17 12:11 ndndien

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

TikhomirovSergey avatar Nov 17 '17 07:11 TikhomirovSergey

@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

lubshilk avatar Nov 19 '17 09:11 lubshilk

@ndndien Thanks I'll try

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

lubshilk avatar Nov 19 '17 09:11 lubshilk

@ndndien Many thanks, with your setting it works

lubshilk avatar Nov 21 '17 07:11 lubshilk

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

lubshilk avatar Nov 21 '17 12:11 lubshilk

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");

ksurya28995 avatar Oct 21 '18 04:10 ksurya28995

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.

Vyankat16 avatar Mar 23 '19 17:03 Vyankat16

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

On Sat, 23 Mar, 2019, 11:16 PM Vyankat16, [email protected] 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 .

ksurya28995 avatar Mar 23 '19 17:03 ksurya28995

Hi ksurya,

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

Vyankat16 avatar Mar 23 '19 17:03 Vyankat16