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

WebDriverException: Returned value cannot be converted to WebElement

Open apanashchenko opened this issue 9 years ago • 5 comments

Description

Hi guys! I tried to update the java-client version from 5.0.0-BETA9 to 5.0.3 and have error:

Caused by: WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=5B07CB4B-816B-49B9-9101-9437E16B094F, label=, type=XCUIElementTypeTextField}

Environment

  • java client build 5.0.3.
  • Appium server: 1.6.5
  • Desktop OS: MacOS
  • Node.js version: v8.4.0
  • Mobile platform: iOS v10.3.3
  • Real device: iphone 7

Details

My pom.xml dependencies: https://gist.github.com/apanashchenko/9139209698b0c1655f9114a3a868dab3

When I tried to exclude selenium but have same issue. https://gist.github.com/apanashchenko/5fffd6d00b4b8b22f2464d1da8a8857c

apanashchenko avatar Sep 15 '17 13:09 apanashchenko

@apanashchenko Could please you show some code sample to reproduce it and please show there the java stacktrace

TikhomirovSergey avatar Sep 16 '17 07:09 TikhomirovSergey

@TikhomirovSergey You can create maven project and use all my dependency. This is java exception: Caused by: WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=5B07CB4B-816B-49B9-9101-9437E16B094F, label=, type=XCUIElementTypeTextField

apanashchenko avatar Sep 17 '17 13:09 apanashchenko

@apanashchenko This string is looking suspiciously https://gist.github.com/apanashchenko/9139209698b0c1655f9114a3a868dab3#file-pom-xml-L15

and this too https://gist.github.com/apanashchenko/5fffd6d00b4b8b22f2464d1da8a8857c#file-pom_exclude-xml-L15

Selenide still depends on older selenium version https://mvnrepository.com/artifact/com.codeborne/selenide/4.6

And there is dependency conflict. Please exclude selenium from selenide and try again. I am labeling this issue as invalid.

TikhomirovSergey avatar Sep 19 '17 12:09 TikhomirovSergey

@apanashchenko I am closing this ticket. If you are not agree and you are still facing up this issue then please reopen this issue and provide some more details

TikhomirovSergey avatar Sep 20 '17 15:09 TikhomirovSergey

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