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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠