简体   繁体   English

适用于iOS本机设备功能的Appium自动化

[英]Appium automation for iOS Native device features

I am using Appium for mobile native app automation on real devices in Android (4.4x) and iOS (9x). 我在Android(4.4x)和iOS(9x)的真实设备上使用Appium进行移动本机应用程序自动化。 Some of the Test Cases include following operations to be automated: 一些测试用例包括以下要自动化的操作:

  • Killing the app under test 终止测试中的应用
  • Enable / Disable Location services 启用/禁用位置服务
  • Restart Device 重启设备
  • Lock / Unlock Device 锁定/解锁设备
  • Pushing the app in the background 在后台推送应用
  • Simulating home button 模拟主页按钮

In Android, using adb commands we are able to automate the above scenarios.But in iOS we are stuck and not able to proceed. 在Android中,使用adb命令可以使上述情况自动化。但是在iOS中,我们会卡住并且无法继续。

The major reason that why we are not able to automate the above operations in iOS is because 我们无法在iOS中自动执行上述操作的主要原因是

  • Appropriate Appium commands are not working 适当的Appium命令不起作用
  • No alternative such as adb available in iOS iOS中没有其他替代方法,例如adb
  • Objects not accessible which can perform these operations 无法访问的对象可以执行这些操作

Appreciate your help 感谢您的帮助

Ashish - The test cases you are looking for cannot be automated for iOS. Ashish-您要寻找的测试用例无法针对iOS自动化。 This is mainly because of limitations created by Apple. 这主要是由于Apple造成的限制。 Basically, all that Apple allows to do is automate your app, and your app operates in a sandbox. 基本上,Apple允许做的就是使您的应用程序自动化,并且您的应用程序在沙箱中运行。 If you want to access system lever alerts or apps, you cannot automate that. 如果要访问系统杠杆警报或应用程序,则无法自动执行。

Appium is a good tool, but it's just a wrapper on Apple's instruments. Appium是一个很好的工具,但它只是Apple仪器的包装。 If you are trying to get better control of your automation, we recommend using Apple's Instruments scripts or XCTest. 如果您想更好地控制自动化,建议您使用Apple的Instruments脚本或XCTest。 This will definitely give you better control. 这肯定会给您更好的控制。 If you have any more questions you can send us an email from our website and we can assist you. 如果您还有其他疑问,可以从我们的网站给我们发送电子邮件,我们可以为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM