如何使用appium从iPhone启动已安装的应用程序 [英] How to launch already installed app from iPhone using appium

查看:75
本文介绍了如何使用appium从iPhone启动已安装的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Java + TestNG + Appium编写自动化脚本.

I am writing an automation script using Java + TestNG + Appium.

在一个测试方案中,我试图在iPhone上启动已安装的应用程序. (在这种情况下为方框). Box包含一些我需要访问的MS Office文件. 我不太确定如何实现这一目标.

In a test scenario, I am trying to launch already installed application on iphone. (Box in this case). Box contains some MS office file which I need to access. I am not very sure how can I achieve this.

我尝试了多种选择,例如从iTunes中提取.app文件并使用Appium进行部署,但是没有成功.

I tried multiple options such as extracting .app file from iTunes and deploying using Appium, but no success.

如果可以的话,有人可以指导我.如果是,怎么办?

Can someone please guide me, if this is possible. If yes, how?

推荐答案

在以下情况下使预安装的应用程序自动化.

Automate a preinstalled app with following scenario.

1.这仅适用于使用DEVELOPMENT证书签名的应用程序.

1.This will only work for applications that are signed with a DEVELOPMENT cert.

2.这不适用于使用DISTRIBUTION证书签名的应用程序

2.This will NOT work for applications that are signed with a DISTRIBUTION cert

3.如果您已使用开发者配置文件创建了应用程序,并自行构建.或使用testFlight下载它,并使用开发配置文件进行签名

3.If you have created the app with a developer provisioning profile, and built yourself. Or downloaded it using testFlight, and is signed with a development provisioning profile

4.这是因为Apple的Instruments不允许您与那些正在运行的应用程序进行交互. (即使您知道bundleId也是如此)

4.This is because Apple's Instruments will not allow you to interact with those applications which is live. (Even if you knew the bundleId)

如果您的应用处于开发模式,请遵循以下步骤 1.设备上已安装的应用程序的bundleId.将其用作应用程序功能.

if your app is in development mode please follow these things 1.The bundleId of the app that was installed on the device. Use that as the app capability.

  1. 关注Appium Real Devices 指南(用bundleId替换任何.ipa/.app引用)
  1. Follow the Appium Real Devices guide (substitute any .ipa/.app reference with the bundleId)

除了常规的desiredCapabilities(例如platformNameplatformVersiondeviceName)之外,这些还应该是您的desiredCapabilities:

In addition to your regular desiredCapabilities (ex. platformName, platformVersion, deviceName).. these should be your desiredCapabilities:

用于预安装的应用

desiredCaps['app'] = 'yourbindleID'

设备的唯一标识符

desiredCaps['udid'] = '1824y983h2849gh2498'

这篇关于如何使用appium从iPhone启动已安装的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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