Getting screenshot on iOS 15.0.2

0

Hi, I am facing a problem while using Testng + appium test type on aws devicefarm. Taking screenshot on iOS 15.0.2 devices, gives a screenshot exception. This code is working fine on iOS 14.x and 13.x devices.

On line: ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); [TestNG] org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken

I suspect this issue is because of prebuilt WDA version V6, as I am able to reproduce it locally. Please check

https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/mobile/projects/ba8e59b9-76a8-40b2-9928-951bfdaf6e1b/runs/f7ea613e-bf68-4f74-9922-daef217949f4

Thanks

質問済み 2年前503ビュー
1回答
0

Background: The WDA version on Device Farm is always selected based on the Appium version you select. Device Farm does not change the default mapping of WDA to Appium on a fresh setup. The local setup should have the same version mapping unless it is explicitly changed by the customer.

Pointers to check:

  1. Looking at Appium repo and other forums, it seems that this may be a known issue where the screenshot is taken in spite of the exception being thrown https://stackoverflow.com/questions/30714210/screenshot-exception-screenshot-has-been-taken
  2. What is the Appium version you are using? I would suggest using 1.19.0 if you are not using it.
  3. When you mentioned, you are able to reproduce it locally do you mean that you are getting the same exception locally on iO S15.0.2?
AWS
回答済み 2年前
  • Please find answers to key pointers

    1. Screenshot is not being taken, as appium log clearly shows: 2021-12-27 07:56:11:876 - [Xcode] 2021-12-27 07:56:11:877 - [WD Proxy] Got response with status 500: {"value":{"error":"unable to capture screen","message":"Error Domain=XCTDaemonErrorDomain Code=39 "Legacy screen requests are no longer supported" UserInfo={NSLocalizedDescription=Legacy screen requests are no longer supported}","traceback":""},"sessionId":"5E1E2823-42C0-44DA-B2C3-EBBDF16B4C98"} 2021-12-27 07:56:11:877 - [debug] [W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen 2021-12-27 07:56:11:877 - [XCUITest] Error getting screenshot: Error Domain=XCTDaemonErrorDomain Code=39 "Legacy screen requests are no longer supported" UserInfo={NSLocalizedDescription=Legacy screen requests are no longer supported}

    2. I am using Appium version 1.19.0, and which by default uses prebuilt WDA version V6.

    3. Locally, I am not getting same exception, rather some exception, which think because of Xcode version mismatch.

    I am using same yml file for running tests on iOS 13.x and 14.x, which is working, but not for iOS 15.x

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ