appium v​​s ios模拟器ios真实设备设置,可成功实现移动自动化

Dear Bug Hunters!

亲爱的臭虫猎人!

Mobile Automation is getting more popular everyday. Appium is one of the most popular tools for Mobile Automation. Configuring iOS simulator/real device to run your tests and inspect elements can be confusing and time consuming to finally make it work.

移动自动化每天都在变得越来越流行。 Appium是最受欢迎的移动自动化工具之一。 配置iOS模拟器/真实设备以运行测试和检查元素可能使最终工作变得混乱且耗时。

In this article i will explain step by step how to do full configuration for Appium to be able to run tests on simulator/real device and also provide some workarounds for common errors that you might face while configuring it.

在本文中,我将逐步说明如何对Appium进行完整配置,以便能够在模拟器/真实设备上运行测试,并提供一些解决方案,以解决您在配置它时可能遇到的常见错误。

I hope it will save your time:)

我希望它可以节省您的时间:)

预安装 (Pre-installations)

Assuming you have npm, node, xCode and homebrew installed, if not — please install them

假设您已安装 npm,node,xCode homebrew ,如果没有,请安装它们

  1. Install Appium using the following command:

    使用以下命令安装Appium:
  • npm install -g appium

    npm install -g appium

2. Install carthage using the following command:

2.使用以下命令安装迦太基:

  • brew install carthage

    酿造安装迦太基

3. Install CocoaPods

3.安装CocoaPods

  • brew install cocoapods

    酿造安装cocoapods

4. Open your project in xCode

4.在xCode中打开您的项目

5. In Terminal navigate to your project folder and run pod install to have all dependencies:

5.在终端中,导航到您的项目文件夹,然后运行pod install以具有所有依赖项:

  • pod install

    吊舱安装

6. Build an app to your simulator (as example iPhone 11)

6.在您的模拟器上构建一个应用程序(例如iPhone 11)

Yay App is built successfully! Now lets configure Appium to access iOS Simulator!

Yay App已成功构建! 现在,让我们配置Appium来访问iOS模拟器!

配置Appium以在iOS Simulator上运行该应用 (Configure Appium to run the app on iOS Simulator)

WebDriverAgent is a WebDriver server implementation for iOS that can be used to remote control iOS devices.

WebDriverAgent是用于iOS的WebDriver服务器实现,可用于远程控制iOS设备。

我们需要向xCode添加一个帐户(您可以使用Apple ID或创建新帐户)。 (We need to add an account to xCode (you can use your Apple Id or create new).)

  1. For that go to xCode — Preferences — Accounts:

    为此,请转到xCode-首选项-帐户:

Image for post
Sign in with your Apple Id or create a new one
使用您的Apple ID登录或创建一个新的

Once you are signed in — you account will appear at the left.

登录后,您的帐户将显示在左侧。

我们需要将签名证书添加到该帐户: (We need

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值