How to swipe up on ios device to terminate app - Device Farm

0

We are observing different behavior when running our automation tests on a physical iPhone versus a Device Farm iPhone 12. On our local physical device, using the code below, we are able to successfully swipe up to terminate the app. However, the same code does not reliably swipe up to terminate the app when running on a Device Farm device.

What can be implemented to resolve this?

window_size = frapp.driver.get_window_size() logging.info(f"The device window size is: {window_size}") param = { "duration": "1", "element": None, "fromX": window_size["width"] / 2, "fromY": window_size["height"] / 0.8, "toX": window_size["width"] / 2, "toY": window_size["height"] * 0.8, } logging.info( f"The parameters used for the first swipe up to open app switch carousel with parameters: {param}" ) frapp.driver.execute_script("mobile: dragFromToForDuration", param) param = { "duration": ".3", "element": None, "fromX": window_size["width"] / 1.3, "fromY": window_size["height"] * 0.8, "toX": window_size["width"] * 2, "toY": -1000, } logging.info( f"The parameters used for the second swipe is to kill the app with parameters: {param}" ) frapp.driver.execute_script("mobile: dragFromToForDuration", param)

質問済み 7ヶ月前253ビュー
2回答
0
  1. Have you confirmed this also works as expected in a local emulator ?
  2. Have you compared the error logs from Device Farm tests vs success logs from physical device
AWS
サポートエンジニア
回答済み 7ヶ月前
  • I validated that this works successfully on a simulator.

    The below error is returned in device farm logs. This error is not present on local executions on Physical or simulator device:

    2023-10-26 22:04:51:566 - [IOSDeviceLog] Oct 26 18:04:43 PDX000191552 backboardd(CoreBrightness)[63] <Error>: invalid parameters

0

Issue solved by upgrading to appium 2.2.1.

回答済み 6ヶ月前

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

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

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

関連するコンテンツ