java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
See original GitHub issueDescription
@SrinivasanTarget @mykola-mokhnach @TikhomirovSergey @jlipps @saikrishna321
Once appium starts up and begins to find and use element id’s in the mobile app, an error is thrown:
org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {ELEMENT=1}
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
Appium Log files: https://gist.github.com/telangn
Environment
Ubuntu 16 OS
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>6.0.0-BETA2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
Details
GIST for appium log files:
https://gist.github.com/telangn
Link to Appium logs
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
java.util.HashMap cannot be cast to org.openqa.selenium ...
Exception in thread "main" java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement.
Read more >java.util.HashMap cannot be cast to org.openqa.selenium ...
Just installed Katalon 5.7.1 using this tutorial . Started with Example project for mobile. Both exa…
Read more >Selenium error: java.util.HashMap cannot be cast to java.util.List
Following is the documentation for the execute method: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidexecute.
Read more >java.util.HashMap cannot be cast to org ... - Appium Discuss
How do I resolve this issue Returned value cannot be converted to WebElement java.util.HashMap cannot be cast to org.openqa.selenium.
Read more >【iOS】java.lang.ClassCastException: java.util.HashMap cannot be ...
【iOS】java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement #10098.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@otaviolandim @tutkuefe Sorry for the late reply. Interesting, I looked at my POM and besides Cucumber and JUnit libraries, this is all I have.
<dependency> <groupId>io.appium</groupId> <artifactId>java-client</artifactId> <version>6.0.0</version> </dependency>
Thanks for your answer it helped me @telangn