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

org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement

Open psiddard opened this issue 8 years ago • 8 comments

Description

Couldn't select any element when running script in local iOS simulator in a native hybrid app. Tried updating to latest appium java-client, selenium-java, appium version

Environment

  • java client build version or git revision if you use some shapshot: 5.0.4
  • Appium server version or git revision if you use some shapshot: 1.7.1
  • Desktop OS/version used to run Appium if necessary: 1.6.1
  • Mobile platform/version under test: iOS
  • Real device or emulator/simulator: Simulator

Exeption stacktraces

org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=27000000-0000-0000-8467-000000000000} Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'MC02SL0RCFVH8', ip: '2600:1700:3571:dca0:d33:46f5:5953:5c8b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_171' Driver info: driver.version: IOSDriver

Link to Appium logs

https://gist.github.com/psiddard/c16d1fd9edc5f5c8cc8b94470888b44f

psiddard avatar May 18 '18 03:05 psiddard

#895

SrinivasanTarget avatar May 21 '18 16:05 SrinivasanTarget

@SrinivasanTarget I'm getting the same exception; I'm testing on an iOS Simulator too. Downgrading Selenium (which was originally 3.11.0) didn't work, nor did downgrading java client.

Is there any workaround? Or will this be resolved by Appium?

Exception stack trace:

org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: //*[@text='Search Results']
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'USGPSNYCM212943.local', ip: 'fe80:0:0:0:462:ed8d:f2e4:f85d%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_152-release'
Driver info: driver.version: unknown

shyIes avatar May 23 '18 18:05 shyIes

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

@ksurya28995

THANKS, YOU SAVE MY LIFE !!

ricardolimachen avatar Nov 09 '18 20:11 ricardolimachen

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

Thx a lot dude! works for me!! love you

renatojoa avatar Nov 09 '18 20:11 renatojoa

@ksurya28995

Thx, man! It works! It's all I needed for now. Maybe later I'm gonna try to investigate how it works.

diegorq avatar Nov 09 '18 20:11 diegorq

@ksurya28995

Thanks . You made my day!!

metacubeqa avatar May 23 '19 11:05 metacubeqa

The below video was helpful in resolving issue https://youtu.be/FTODdczjfDc

mani537 avatar Sep 20 '20 17:09 mani537