1.使用Xcode遇到的问题

xcode-select: error: tool 'instruments' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

解决方法:

报这个错误的原因是xcode-select不在默认的路径
a).找到xcode-select的当前路径终端命令行

xcode-select --print-path

/Library/Developer/CommandLineTools

b).设置xcode-select到指定位置

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

c) .验证是否设置成功

xcode-select --print-path

/Applications/Xcode.app/Contents/Developer

2. 查看设备列表

instruments -s devices

3.查看设备udid

xcrun simctl list

4. 'RoutingHTTPServer/RoutingConnection.h' file not found'报错

问题一:出现'RoutingHTTPServer/RoutingConnection.h' file not found,编译错误.

问题二:xcodebuild failed with code 65

解决处理方法:

4.1.cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent

4.2.在wda根目录下,输入sh ./Scripts/bootstrap.sh下载依赖,wda重新编译

4.3.重新build了project后,就没有报错了

5. WebDriverAgent/Carthage/Build/iOS/RoutingHTTPServer.framework/Headers/RouteResponse.h:8:1: 'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained'

解决方法:

@property (nonatomic, assign, readonly) HTTPConnection *connection;

修改为:@property (nonatomic, strong, readonly) HTTPConnection *connection;

6. WebDriverAgent/WebDriverAgentLib/Routing/FBWebServer.m:12:9: Could not build module 'RoutingHTTPServer'

解决方法:

@property (nonatomic, assign, readonly) HTTPConnection *connection;

修改为:@property (nonatomicstrongreadonly) HTTPConnection *connection;

7. Simply open WebDriverAgent.xcodeproj and start WebDriverAgentRunner test,  Using xcodebuild

命令为:xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max'  test

8. testrunner failed:  WebDriverAgent/<unknown>: failed: caught "NSInvalidArgumentException", "-[UITestingUITests internalImplementation]: unrecognized selector sent to instance 0x600003c32580"; 此问题通过降低xcode版本解决的,使用最新的xcode版本遇到的问题实在无法解决了;

9. xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination  ‘platform=iOS,id=CD7A3E92-9C32-4428-9765-CF99FE14DB10’ test

xcodebuild -project XCTestWD.xcodeproj -scheme XCTestWDUITests   -destination id=D45009A8-A070-A7811C, OS=13.3 XCTESTWD_PORT=8001 clean test

结果: xcodebuild: error: option 'Destination' requires at least one parameter of the form 'key=value' , 处理结果:在xcode 11.3.1中应去掉单引号;

10. 命令行执行WebDriverAgentRunner, xcode版本->11.3.1

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=CD7A3E92-9C32-4428-9765-CF99678900, OS=13.3   test

11. App Inspector-ios Macaca:

npm i -g macaca-cli macaca-ios # 安装命令行工具和驱动模块

macaca run                     # 运行即可

12. npm转cnpm下载(npm下载较慢,转cnpm国内下载很快): 

npm install -g cnpm --registry=https://registry.npm.taobao.org

13. Test XCTestWDUITests 

xcodebuild -project XCTestWD.xcodeproj -scheme XCTestWDUITests   -destination id=D45009A8-A070-4E6F-84FD-D6744EA7811C, OS=13.3 XCTESTWD_PORT=8001 clean test

14. Macaca捕获页面元素

app-inspector  -u  udid

15. 关闭系统显示“其他”用户的设置

sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool FALSE

16. 使用app-inspector 报错: Error: connect ECONNREFUSED 127.0.0.1:8001

解决方法: npm config set proxy null  

17. Failed to create WDA session (An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided

18. An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome '81.0.4044'. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details. You could also try to enable automated chromedrivers download server feature

解决方法(http://npm.taobao.org/mirrors/chromedriver):

把最新版的chromedriver放置到:\node_modules\appium\node_modules\appium-chromedriver\chromedriver\mac 即可解决问题;

19. ideviceinstaller -l

Could not connect to lockdownd. Exiting

解决方法:

brew uninstall -f libimobiledevice ideviceinstaller usbmuxd如果命令被拒绝,可根据提示,更新命令:

brew uninstall --ignore-dependencies libimobiledevice ideviceinstaller usbmuxd

这次命令是成功了然后继续:
brew install -v --HEAD --fetch --build-from-source usbmuxd libimobiledevice ideviceinstaller
ideivesinstaller -l
大功告成,终于出结果了。。


 

Appium_ios自动化问题汇总的更多相关文章

  1. python自动化常见问题汇总

           1.如何提高selenium脚本的执行速度? Selenium脚本的执行速度受多方面因素的影响,如网速,操作步骤的繁琐程度,页面加载的速度,以及我们在脚本中设置的等待时间,运行脚本的线程 ...

  2. selenium IE自动化问题汇总

    驱动下载:http://selenium-release.storage.googleapis.com/index.html 没有修改IE的保护模式设置导致,通常看到报错信息如下: selenium. ...

  3. 轻松自动化---selenium-webdriver(python) (一)

    为什么选python? 之前的菜鸟系列是基于java的,一年没学其实也忘的差不多了,目前所测的产品部分也是python写的,而且团队也在推广python ,其实就测试人员来说,python也相当受欢迎 ...

  4. 轻松自动化---selenium-webdriver(python) (二)

    本节知识点: 打印URL 将浏览器最大化 设置浏览器固定宽.高 操控浏览器前进.后退 打印URL 上一节讲到,可以将浏览器的title打印出来,这里再讲个简单的,把当前URL打印出来.其实也没啥大用, ...

  5. 轻松自动化---selenium-webdriver(python) (三)

     本节重点: 简单对象的定位 -----自动化测试的核心 对象的定位应该是自动化测试的核心,要想操作一个对象,首先应该识别这个对象.一个对象就是一个人一样,他会有各种的特征(属性),如比我们可以通过一 ...

  6. 轻松自动化---selenium-webdriver(python) (四)

    本节要解决的问题: 如何定位一组元素? 场景 从上一节的例子中可以看出,webdriver可以很方便的使用findElement方法来定位某个特定的对象,不过有时候我们却需要定位一组对象, 这时候就需 ...

  7. 轻松自动化---selenium-webdriver(python) (五)

    本节要解决的问题: 层级定位 场景: 假如两个控件,他们长的一模样,还都叫“张三”,唯一的不同是一个在北京,一个在上海,那我们就可以通过,他们的城市,区,街道,来找到他们. 在实际的测试中也经常会遇到 ...

  8. 轻松自动化---selenium-webdriver(python) (六)

    本节知识点: 操作对象: · click 点击对象 · send_keys 在对象上模拟按键输入 · clear 清除对象的内容,如果可以的话 WebElement  另一些常用方法: · text  ...

  9. 轻松自动化---selenium-webdriver(python) (七)

    本节知识点: 多层框架或窗口的定位: switch_to_frame() switch_to_window() 智能等待: implicitly_wait() 对于一个现代的web应用,经常会出现框架 ...

  10. 轻松自动化---selenium-webdriver(python) (八)

    本节重点: 调用js方法 execute_script(script, *args) 在当前窗口/框架 同步执行javaScript 脚本:JavaScript的执行. *参数:适用任何JavaScr ...

随机推荐

  1. C# 利用epplus导出excel,自动求和

    /// <summary> /// 生成xlsx /// </summary> /// <param name="dvLine">数据视图< ...

  2. att&ack学习笔记4

    初识ATT&CK框架前言:ATT&CK这一概念自2014年提出时起,作为安全分析领域中的前沿研究一直在默默地发挥着自己的影响,但是由于其概念在当时过于超前以至于并没有引起多大反响,直至 ...

  3. 3.21 Linux PATH环境变量及作用(初学者必读)

    在讲解 PATH 环境变量之前,首先介绍一下 which 命令,它用于查找某个命令所在的绝对路径.例如: [root@localhost ~]# which rm /bin/rm [root@loca ...

  4. 13-2 c++拷贝控制和资源管理

    目录 13.2.1 行为像值的类 类拷贝赋值运算符的编写 13.2.2 定义行为像指针的类 引用计数 定义一个使用引用计数的类 为了定义这些成员,我们首先必须确定此类型对象的拷贝语义.一般来说,有两种 ...

  5. 题解:CF1776L Controllers

    CF1776L Controllers 题解 分析 先把题目形式化.设 \(n\) 次加减中有 \(x\) 个加,\(y\) 个减,其中 \(a\) 加了 \(u\) 次,减了 \(v\) 次,显然 ...

  6. 操作方法分享:4G模组中移OneNET轻松上云平台

    ​ 一.简介 1.1 IoT_CLOUD的功能 IoT_CLOUD库本质就是上层设计一套通用的API,用库来实现每个平台功能的对接. 目前已经实现了各个平台的所有注册方式,其中自动注册会将相关验证信息 ...

  7. CritiCS:智能协作下的创意长篇故事生成框架 | EMNLP'24

    来源:晓飞的算法工程笔记 公众号,转载请注明出处 论文: Collective Critics for Creative Story Generation 论文地址:https://arxiv.org ...

  8. word 文档签章控件生成的签章批量删除

    某个签章工具的word插件缺少批量插入签章的功能.同时,发现在投标工具中可以使用导出生成pdf时批量签章的功能.现在需要移除先前手动操作生成的多个签章,有如下发现-- 1.对少量签章,可以先选中签章右 ...

  9. 理解Java BlockingQueue

    数据结构与算法是天生一对. BlockingQueue叫做阻塞队列,在Java线程池相关的实现中有广泛的使用. BlockingQueue实现的功能如下: 当队列为空时,往队列中读数据将被阻塞. 当队 ...

  10. 拿到小米 Offer,却迷茫了。。

    大家好,我是程序员鱼皮,12 月了,很多小伙伴也拿到了秋招的 Offer(没拿到也不要灰心),但即使拿到 Offer,可能还会有一些其他的顾虑.今天分享我们编程导航一位鱼友的提问,给大家作为学习成长的 ...