启动appium 命令:

appium --address "127.0.0.1" --session-override --pre-launch --debug-log-spacing --log "/tmp/appium.log" --platform-version "10.2" --platform-name "iOS" --safari --browser-name "Safari" --udid "f9b87274e2a24b310399dd56dd80f8561d99fdac" --show-ios-log --device-name "iPhone 6s Plus"

        DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "safari");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.2");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6s Plus");
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
capabilities.setCapability(MobileCapabilityType.UDID,"f9b87274e2a24b310399dd56dd80f8561d99fdac");
driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

遇到问题:


[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...

[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...

[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...

参考:https://github.com/appium/appium/issues/6892

解决办法:

安装最新版本的appium + appium-xcuitest-driver@2.5.3

cd /usr/local/lib/node_modules/appium
npm uninstall appium-xcuitest-driver
npm install appium-xcuitest-driver@2.5.3


cd  /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent


mkdir -p Resources/WebDriverAgent.bundle


sh ./Scripts/bootstrap.sh -d



安装后,还需要编译appium-xcuitest-driver  打开项目文件使用命令:


open /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/

编译方法
参考:http://www.cnblogs.com/testway/p/6298126.html执行如下命令,会在手机上安装一个 WebDriver 程序


xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=f9b87274e2a24b310399dd56dd80f8561d99fdac' test

执行这些步骤后,可以打开iphone的safari浏览器,但是默认打开的网页地址为appium.io 同时appium日志提示:

2017-01-19 12:13:03:750 - warn: [iOS] Attempted to get a list of webview contexts but could not connect to ios-webkit-debug-proxy. If you expect to find webviews, please ensure that the proxy is running and accessible

2017-01-19 12:13:03:750 - info: [debug] [iOS] No web frames found.

2017-01-19 12:13:03:750 - warn: [iOS] Could not find any webviews yet, refreshing/retrying

2017-01-19 12:13:03:792 - info: [iOSLog] [IOS_SYSLOG_ROW] Jan 19 20:12:51 iPhone locationd[63] <Notice>: message 'kCLConnectionMessageWatchdog' received from client '/System/Library/LocationBundles/WifiCalling.bundle'

 

appium 1.6.3 + ios 10.2 + xcode 8.2.1 真机运行safari的更多相关文章

  1. appium 1.6.3 + ios 10.2 + xcode 8.2.1 真机运行iphone app

    appium命令行启动: appium --address "127.0.0.1" --session-override --pre-launch --debug-log-spac ...

  2. 如何使用Xcode分析调试在真机运行的UE4 IOS版游戏

    写本文的是因为UE4 官方文档虽然也有,但主要讲的是是用UE4Editor把游戏打成一个IPA包的形式发布的方法 而对于想通过Xcode分析UE4的渲染流程来学习或优化的朋友,那官方文档的资料还是不够 ...

  3. 如何在 iOS 真机运行 Appium

    使用 gui 启动的 appium 1.2.2 也会有这个问题,所以你要把 deviceconsole 复制到 /Applications/Appium.app/Contents/Resources/ ...

  4. 使用Xcode 7 beta免费真机调试iOS应用程序

    使用Xcode 7 beta免费真机调试iOS应用程序 六月 9, 2015  |   K-Res 发布   今天凌晨的WWDC15虽然没有熬夜守候吧,但也还是早起第一时间翻看了twitter的相关标 ...

  5. Xcode 7如何免费真机调试iOS应用

    Xcode 7如何免费真机调试iOS应用的简单方式: 运行Xcode后,点击菜单中的Preferences…进入Accounts标签,这里选择添加Apple ID:在弹出的对话框中登入你的Apple ...

  6. Xcode 5、Xcode 6 免证书真机调试

    我们都知道,在iOS开发中,假设要进行真机调试的话是须要苹果开发人员账号的.否则Xcode就不可以进行真机调试.仅仅可以在模拟器上执行:这就带来了非常多问题,比方iCloud编程的话你不可以用模拟器. ...

  7. ionic ios项目真机运行-不用开发者账号

    ionic ios项目真机运行-不用开发者账号 1. 添加ios平台 ionic platform add ios 2.使用XCODE打开项目 3.使用APPID登录XCODE 打开XCODE账号登录 ...

  8. Xcode 6 免证书真机调试

    前景:在 iOS 开发中,如果想进行真机调试,普遍情况是掏钱,掏钱的情况有两种: 第一种就是:直接在 Apple 官网注册为 Developer,每年99美元:当然这种作为个人开发者的话,是很有必要的 ...

  9. 第四章 Appium真机运行测试用例讲解

    -----手机自动化之Appium 手机自动化测试用例虽然可以在模拟器上运行,可是模拟器毕竟和真机还是有区别的.在第二章我们讲到了模拟器上运行测试用例后,我又花了两天的时间,研究了一下真机运行测试用例 ...

随机推荐

  1. TCP/IP具体解释--TCP/UDP优化设置总结&amp; MTU的相关介绍

    首先要看TCP/IP协议,涉及到四层:链路层,网络层.传输层,应用层. 当中以太网(Ethernet)的数据帧在链路层 IP包在网络层 TCP或UDP包在传输层 TCP或UDP中的数据(Data)在应 ...

  2. [js插件]分享一个文章内容信息提示插件Colortip

    引用 项目中需要一个信息提示的功能,就上网找了一个插件,发现colortip实现比较简单,就定了这个插件. 实现过程 官网:http://tutorialzine.com/2010/07/colort ...

  3. MySQL 一个库中表数量是否有限制?

    在网上找了一下,有说几乎没有限制的,也有说表多了肯定会影响性能的,综合起来应该讲: 1)一个库中表数是有限制的, 按照 UNSIGNED 类型,最多42亿多一点,正常应用根本达不到.   2)文件系统 ...

  4. Delegates and Events

    People often find it difficult to see the difference between events and delegates. C# doesn't help m ...

  5. 以前写SpringMVC的时候,如果需要访问一个页面,必须要写Controller类,然后再写一个方法跳转到页面,感觉好麻烦,其实重写WebMvcConfigurerAdapter中的addViewControllers方法即可达到效果了

    以前写SpringMVC的时候,如果需要访问一个页面,必须要写Controller类,然后再写一个方法跳转到页面,感觉好麻烦,其实重写WebMvcConfigurerAdapter中的addViewC ...

  6. springmvc整合slf4j、log4j记录文本日志

    一.配置pom.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 3 ...

  7. Gradle Android最新自动化编译脚本教程

    转自:http://blog.csdn.net/changemyself/article/details/39927381 一.前言 Gradle 是以 Groovy 语言为基础,面向Java应用为主 ...

  8. 【SSH三大框架】Hibernate基础第十一篇:对继承映射的操作

    在java中.类之间能够有继承关系.可是在数据库中是没有继承关系的.只是Hibernate是为了把面向对象的关系反映到数据库中.Hibernate为我们提供了3种方案: 第一.一个继承体系放在一张表中 ...

  9. 【云计算】OpenStack qcow2镜像如何转化为Docker镜像?

    Import qcow2 image to docker hub 参考资料: https://forums.docker.com/t/import-qcow2-image-to-docker-hub/ ...

  10. Android之旅 自我图示总结四大组件

    最近学完了Android的四大组件的基础知识,自己总结了一个图示,希望自己看到这个图的时候能回忆起相关的知识点,与大家分享!