appium / appium/java-client

saveScreenshotAs is not working

Open
#1,200 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

it impossible to save a screenshot in Android

java.lang.NoSuchMethodError: io.appium.java_client.AppiumDriver.setElementConverter(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)V

Environment

  • java client --> 7.1.0
  • Appium server version 1.14.0
  • Mobile platform/version under test: Android 9
  • Real device or emulator/simulator: Real device

Hi,

I have found more info to attach here.

When i change to webview context, i can't perform a findElement because

--> Method threw 'org.openqa.selenium.WebDriverException' exception.
--> Returned value cannot be converted to WebElement: {message=no such element: Unable to locate element: {"method":"class name","selector":"product-header__name"}
(Session info: chrome=76.0.3809.89)
(Driver info: chromedriver=76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}),platform=Mac OS X 10.14.5 x86_64)}

--> java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement

--> com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement

after this, i cant perform the screenshot from webview context

thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing saveScreenshotAs on Android 9 with java-client 7.1.0 and inspect the AppiumDriver.setElementConverter failure and the WebView findElement conversion errors shown in the report. Done means element lookup and screenshot capture work in the reported WebView context without these exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.