使用 appium 访问 iOS 控制中心 [英] Access iOS Control Center using appium

查看:42
本文介绍了使用 appium 访问 iOS 控制中心的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 appium 和以下代码打开控制中心:

I am trying to open the Control Center using appium and the following code:

    int halfWidth = driver.manage().window().getSize().width / 2;
    int screenHeight = driver.manage().window().getSize().height;
    driver.swipe(halfWidth, screenHeight-5, halfWidth, screenHeight-300, 500);  // driver is instance of IOSDriver

应用程序不会打开控制中心,而是从底部向上(使用坐标输入)在屏幕上绘制.任何人都知道如何使用 appium 和滑动(或任何其他方式)打开控制中心?

Instead of opening control centre the app simply draws on the screen upwards from the bottom (using coordinates input). Anyone know how to open Control Center using appium and swipe (or any other way)?

谢谢,查理

推荐答案

好吧,经过大量调查后,在我看来这是不可能的.如果你真的需要这个功能,那么我认为像茄子这样的工具可能是合适的.

Ok so after a fair amount of investigation it seems to me that this is not possible. If you really need this functionality then I think a tool like eggplant might be appropriate.

这篇关于使用 appium 访问 iOS 控制中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆