Appium xcode8 和 ios10 升级之后的问题集中讨论帖,请勿再开贴!

恒温 · September 17, 2016 · Last by lillian replied at May 23, 2017 · 6436 hits
本帖已被设为精华帖!

最近升级了 xcode8 和 ios10,先说我遇到的一个问题,

  1. 使用 libimobiledevice 系列工具遇到: ERROR: Could not start service com.apple.syslog_relay.,重装即可:

    brew reinstall --HEAD libimobiledevice
    再执行 sudo chmod 777 /var/db/lockdown 注1

  2. xcode8 移除了UIAutomation,所以以前的 UIAutomation 那一套肯定不能用了。

[MJSONWP] Encountered internal error running command: Error: Could not find Automation.tracetemplate in any of the followinglocations /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate,/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
at getAutomationTraceTemplatePathWithoutRetry$ (lib/xcode.js:172:9)

注1:

Tracing failing libimobiledevice commands using opensnoop, points to /var/db/lockdown/. This directory turns out to have different permissions than those of working machines, blocking libimobiledevice from access to device plists (certificates, keys, etc). This explains why the commands work while using sudo.

This issue can only temporarily be fixed by either using chmod or repair_packages (OSX 10.11) to change the permissions back:

QA01:~$ sudo chmod 777 /var/db/lockdown
or

QA01:~$ sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /
Password:
Permissions differ on "private/var/db/lockdown", should be drwxrwxrwx , they are drwx------ .
Repaired "private/var/db/lockdown".

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 96 条回复 时间 点赞

jenkins中用xcode插件打包失败,提示“Code signing is required for product type 'Application' in SDK 'iOS 10.0'”。
然而我发现xcode8是覆盖安装xcode7的,sdk只有iOS 10的,而且已经默认iOS 10,尝试在xcode插件的sdk中手动输入iOS 10的sdk路径也是无效。
现在只能换回xcode7+iOS9.3了

再见UIAutomation

UIAutomation不能用了,大家公司切走了么, appium应该也不能用了

#3楼 @dengwei729 据说appium 1.6上用XCUITest来代替UIAutomation

#4楼 @zuiniao123 我这边自动化是直接用的UIautomation😢 , appium1.6 直接xcuitest,我查一下

#4楼 @zuiniao123 官方也是这样说的。

p.s macaca 已经全面支持 ios10 了。 大家可以试试看。 @xdf 快来案例下。。

xdf [Topic was deleted] 中提及了此贴 18 Sep 11:17
思寒_seveniruby 将本帖设为了精华贴 18 Sep 12:34

加精理由: 覆盖近期关注问题

xcuitest支持黑盒测试么

#11楼 @itboyst 支持,和 uiautomation 没啥差别。

#12楼 @Lihuazhang 那去哪里选择要测试的App呢,貌似默认都是启动自己的工程

xcodebuild 命令打包报错

Check dependencies
BaseProject has conflicting provisioning settings. BaseProject is automatically signed, but provisioning profile InhouseTest has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'

关闭 Automatically manage signing 之后正常打包


目前是拉取新代码后通过 Shell 修改文件关闭

sed -i "" s/'ProvisioningStyle = Automatic;'/'ProvisioningStyle = Manual;'/g YourProject.xcodeproj/project.pbxproj

#1楼 @zuiniao123
你看下完整的错误一不一样

dengweideMacBook-Pro:runScripts dengwei$ /usr/bin/instruments -w 00e630def672da63ed0bae762c3d78aebb67ea8d -t /Applications/xcode7/Xcode.app/Contents/Developer/../Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/dengwei/Documents/ios_auto/test.app -e UIASCRIPT /Users/dengwei/Documents/ios_auto/src/cases/search/aroundSearch/TC_P1_1611007.js -e UIARESULTSPATH /Users/dengwei/Documents/ios_auto/output -v
2016-09-19 10:05:58.392 instruments[452:3696] WebKit Threading Violation - initial use of WebKit from a secondary thread.
dengweideMacBook-Pro:runScripts dengwei$

xcode7 在ios10设备上,command执行脚本,没有任何报错,大家遇到过么? 有什么法子么

16Floor has been deleted

#12楼 @Lihuazhang XCUITest怎么去测试一个已经打出ipa包的app,找了百度,谷歌都没找到方法

uitesting用了一年了,so, 转成swift3就完事。。嗨皮

#18楼 @shenkai600 请教下uitesting截图你是怎么搞得呢

appium 1.6 beat版本已经可以在模拟器上跑了,但是好像在真机还不行

#17楼 @itboyst 一个已经打出ipa包的app 是什么东西?

#1楼 @zuiniao123 你切回来后,会不会报APP installing Failed的错误????

#21楼 @Lihuazhang 就是没有源码的情况下,怎么去指定我要去测试的app

#14楼 @sanlengjingvv 经过google竟然搜到社区了. 我也遇到了这个问题.

#14楼 @sanlengjingvv 这个变化十分恶心。

今天又有问题了😂
原来打包是这样指定 provison 和签名的

xcodebuild archive -workspace Project.xcworkspace -scheme Project -archivePath Project.xcarchive CODE_SIGN_IDENTITY="identity" PROVISIONING_PROFILE="11111111-1111-1111-1111-111111111111"

升级后这样没用,用了代码库中的 provision 所以报错了

Check dependencies
No profile matching 'DevelopTest' found: Xcode couldn't find a profile matching 'DevelopTest'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'

还是直接改文件了

sed -i ""  s/'PROVISIONING_PROFILE = ".*";'/'PROVISIONING_PROFILE = "1111111-2222-2222-1111-111111111111";'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'PROVISIONING_PROFILE_SPECIFIER = .*;'/'PROVISIONING_PROFILE_SPECIFIER = InhouseTest;'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'CODE_SIGN_IDENTITY = ".*";'/'CODE_SIGN_IDENTITY = "identity";'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'"CODE_SIGN_IDENTITY\[sdk=iphoneos\*\]" = ".*";'/'"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "identity";'/g Project.xcodeproj/project.pbxproj

xcodebuild archive -workspace Project.xcworkspace -scheme Project -archivePath Project.xcarchive

#25楼 @skytraveler
#24楼 @seveniruby

#26楼 @sanlengjingvv 这苹果修改的真是任性. 看起来是变规范了. 都统一到标准的项目文件了. 按理说这个配置文件应该有对应的命令行工具直接修改

#26楼 @sanlengjingvv

我也是sed修改配置文件
ProvisioningStyle = Manual 暂时解决了问题

最近临时接手,对ios构建还是半生不熟。发现xcode每次升级都要折腾我们一番。
Xcode的这一套签名方案真够绕的,最近打算把这破玩意儿好好刷一遍,争取弄通了写一篇文章。

UIAutomation不能用了,基于此的monkey测试的替换方案大家是怎么做的啊?用EarlGrey?

上午ci又坏了,折腾了半天。

提供一下排查思路:
1.在ide上做设置,根据红色叹号做修改,然后package,package成功后保存工程配置文件。
2.check out 出来原来不能成功的工程配置文件,两边做比较。
3.在ci build前 sed 替换工程配置文件中的项。
4.目前大体看来就是 @sanlengjingvv 说的哪些项。

因为开发本地build和ci打包配置(主要是签名相关的)肯定不一样,肯定会冲掉你做的设置。所以sed动态修改是没有办法的办法。

@Lihuazhang
Could not find Automation.tracetemplate in any of the followinglocations
这个不行了。。就启动不了Inspector。是换工具去查看控件吗?

#32楼 @zq1956 appium 1.5.3 不能配合xcode8使用。 目前没有办法。

#30楼 @rogergan 直接用 appium 吧,或者你用 WebDriverAgent 也行。

大赞!
整来整去把ideviceinstaller整坏了,用homebrew重新安装显示xcode7过时需要安装到xcode8,更新xcode8后ideviceinstaller就不能用了.
用了楼主的方法重新安装"brew reinstall --HEAD libimobiledevice 再执行 sudo chmod 777 /var/db/lockdown"就搞定了.😍

发现在同一台机子上保留xcode7和xcode8的方法:
先将/Applications/目录下的Xcode.app改名为xcode7,然后再在app store中升级成xcode8,这样在Applications目录中就有两个xcode了.

@seveniruby @Lihuazhang 出了xcode8后,UIAutomation api查询地址,俩位能找到么?

#38楼 @dengwei729 直接官网没有嘛?

#39楼 @Lihuazhang 官网没有找到,帮忙找找呗

41Floor has been deleted
汪汪 [Topic was deleted] 中提及了此贴 10 Oct 19:30
恒温 #43 · October 10, 2016 作者

#40楼 @dengwei729 我也没有找到。。。

#33楼 @Lihuazhang 那是说现在在xcode8和ios10上,appium1.5.3已经不能用了吗?没有任何的解决方案了吗?我也是跑case的时候会报错“[Xcode] Could not find Automation.tracetemplate in any of...”

46Floor has been deleted

使用sudo chmod 777 /var/db/lockdown 方法没有搞定 使用sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /就搞定了

跟1L差不多报错,Xcode8命令行打包报错,Xcode7是正常的

Signing for "xxxx" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'

#44楼 @rogergan 赞,你是保存了一份么,哈哈

同一套代码,可以在 uiautomation 成功运行,但是在 xcuitest 失败了,不知道什么原因。大家能帮帮忙看看是什么问题吗?https://github.com/appium/appium-xcuitest-driver/issues/235

话说现在升级到ios10 了,大家稳定性测试怎么做的呢?

恒温 #52 · October 14, 2016 作者

#51楼 @dengwei729 你是说uiautomation的monkey不能跑了是吧?

#52楼 @Lihuazhang 是的,现在ios10市场占有率很高了,稳定性测试需要兼容它了

恒温 #54 · October 14, 2016 作者

#53楼 @dengwei729 有XCUITesting改一套呗

#50楼 @wenshi11019 我也遇到了同样的问题,同一套代码,在 uiautomation 成功运行,在 xcuitest 上运行失败了。Appium的log中看不出什么端倪,代码报错是:An element could not be located on the page using the given search parameters。难道说用xcuitest时要改变xpath的定位路径?

恒温 #56 · October 16, 2016 作者

#55楼 @wanwan001 好像是听说xpath 变了。

#27楼 @seveniruby
减少了一部分 Shell ,换成多个target的方式,在 xcodebuild 命令里指定不同的 Scheme ,有点像 Gradle 了。


#26楼 @sanlengjingvv
实时替换的,希望能帮到其他人
sed -i "" "s/PROVISIONING_PROFILE = \".\";/PROVISIONING_PROFILE = \"${mobileprovision_uuid}\";/g" Project.xcodeproj/project.pbxproj
sed -i "" "s/PROVISIONING_PROFILE_SPECIFIER = .
;/PROVISIONING_PROFILE_SPECIFIER = \"${mobileProvisionOutputName}\";/g" Project.xcodeproj/project.pbxproj
sed -i "" "s/CODE_SIGN_IDENTITY = \".\";/CODE_SIGN_IDENTITY = \"${mobileCertificationOutputName}\";/g" Project.xcodeproj/project.pbxproj
sed -i "" "s/\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \".
\";/\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"${mobileCertificationOutputName}\";/g" Project.xcodeproj/project.pbxproj

在ios10上,使用 scrollTo方法,结果悲剧了,appium太贱了

自己拼的请求,报错

[JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/C4636841-6E75-4181-B828-09972EEB43CC/element] with body: {"using":"class name","value":"XCUIElementTypeTableView"}
[JSONWP Proxy] Got response with status 200: {"value":"Invalid argument for class used 'XCUIElementTypeTableView'. Did you mean XCUIElementTypeXCUIElementTypeTableView?","sessionId":"C4636841-6E75-4181-B828-09972EEB43CC","status":15}

#59楼 @dengwei729
尝试用swipe方法来做:

/wd/hub/session/a07d8685-4109-48b9-8185-337da0f75c81/touch/perform {"actions":[{"action":"press","options":{"x":192,"y":467}},{"action":"wait","options":{"ms":100}},{"action":"moveTo","options":{"x":182,"y":50}},{"action":"release","options":{}}]}

大家对滑动的操作,有什么见解:

  • 下拉操作可以操作
  • 上拉UI反应不正常,可以说没反应

#59楼 @dengwei729

找到原因了:
public void swipe(int startx, int starty, int endx, int endy, int duration)

endx 所传参数应该是增量
endy 所传参数应该是增量

[HTTP] --> POST /wd/hub/session/97559adb-a894-40d2-9f87-7341aac8d530/touch/perform {"actions":[{"action":"press","options":{"x":187,"y":517}},{"action":"wait","options":{"ms":300}},{"action":"moveTo","options":{"x":187,"y":50}},{"action":"release","options":{}}]}
[MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"press","option...
[debug] [XCUITest] Executing command 'performTouch'
[JSONWP Proxy] Proxying [POST /uiaTarget/0/dragfromtoforduration] to [POST http://localhost:8100/session/70E712D5-44E1-447B-826F-86A460A555C7/uiaTarget/0/dragfromtoforduration] with body: {"
fromX":187,"fromY":517,"toX":374,"toY":567,"duration":0.3}

之前安装了appium1.6.0-beta1,现在有了appium1.6.0之后想换成1.6.0再试试,但是安装appium总是报这样的错误:

wanqingyaodeMac:npm wanqingyao$ npm install -g appium
npm ERR! tar.unpack unzip error /var/folders/tf/89068tvn199bhwpk5r3hg03h0000gn/T/npm-3970-7391db21/registry.npmjs.org/appium-adb/-/appium-adb-2.6.17.tgz
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.9.1/bin/node" "/usr/local/bin/npm" "install" "-g" "appium"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5

npm ERR! unexpected end of file
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR! /Users/wanqingyao/npm/npm-debug.log

已经在github上提问,但是还没有收到任何回应。在网上看了一篇帖子:http://www.jianshu.com/p/f0feba219a21,按照上面的提示也没有解决问题。请教各位大神,有没有人遇到过类似的问题呢?

求帮忙啊 Appium 录制的node.js脚本 但是启动页滑动没用啊
该怎么改 谢谢了啊 搞定重谢😆

升级xcode到8.1,升级appium到1.6.0,appium-doctor检测环境没问题。但是运行测试脚本时总是出现错误,我的测试脚本(该脚本在appium1.5.3上运行没问题)是:

def openApplication(self,time):
desired_caps = {}
desired_caps['automationName'] = 'XCUITest'
desired_caps['appium-version'] = '1.6.0'
desired_caps['platformName'] = 'iOS'
desired_caps['platformVersion'] = '10.1'
desired_caps['deviceName'] = 'iPhone SE'
desired_caps['app'] = os.path.abspath('/Users/wanwan/Desktop/campus.app')
self.driver=webdriver.Remote('http://0.0.0.0:4723/wd/hub',desired_caps)
sleep(3)

self.driver=webdriver.Remote('http://0.0.0.0:4723/wd/hub',desired_caps)

这行代码总是出现如下报错:

File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 417, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''

我在社区和网站上搜索了相关解决方案,问题依然无法解决。有没有遇到相同问题的伙伴,求指导。谢谢!https://testerhome.com/topics/6277https://testerhome.com/topics/729

#49楼 @dengwei729 会用Google搜索很重要,机会没有找不到的资料,只要描述够清楚,哈哈哈哈哈

#35楼 @chenhengjie123 appium跑monkey测试会不会太慢了。。。。点击起来不够快

appium 1.6运行的时候报这个错误,是什么原因

[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess.<anonymous> (lib/teen_process.js:66:19)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
{ [Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1]
stdout: '\u001b[1mFetching dependencies\n*** Downloading RoutingHTTPServer.framework binary at "v1.0.1"\n*** Downloading KissXML.framework binary at "5.0.5"\n*** Downloading peertalk.framework binary at "v1.0"\n',
stderr: 'GitHub API request failed: NetworkError(Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSURLSessionDownloadTaskResumeData=<CFData 0x7f8269676390 [0x7fffd0690bd0]>{length = 7098, capacity = 16384, bytes = 0x3c3f786d6c2076657273696f6e3d2231 ... 2f706c6973743e0a}, NSErrorFailingURLKey=https://github-cloud.s3.amazonaws.com/releases/59389292/401b6b1c-1fca-11e6-8897-2cf41b29192a.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161111%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161111T063628Z&X-Amz-Expires=300&X-Amz-Signature=409ec20d0408341bc2e993da316507774aea88dfe0c627bf043f32c149f45477&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRoutingHTTPServer.framework.zip&response-content-type=application%2Foctet-stream, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://github-cloud.s3.amazonaws.com/releases/59389292/401b6b1c-1fca-11e6-8897-2cf41b29192a.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20161111%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20161111T063628Z&X-Amz-Expires=300&X-Amz-Signature=409ec20d0408341bc2e993da316507774aea88dfe0c627bf043f32c149f45477&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DRoutingHTTPServer.framework.zip&response-content-type=application%2Foctet-stream, NSUnderlyingError=0x7f8269632f10 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _kCFStreamErrorCodeKey=-2102})\n',
code: 1 }
[XCUITest] Shutting down WebDriverAgent
[debug] [XCUITest] Reset not set, not ending sim
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess.<anonymous> (lib/teen_process.js:66:19)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
[HTTP] <-- POST /wd/hub/session 500 92921 ms - 199

#67楼 @rogergan 和机器性能关系很大。SE 上很流畅,5S 就比较卡。不过其实 monkey 速度快慢倒问题不大,关键是支持了一台 mac 带多台 iPhone 并行运行了,节省了不少成本。

#69楼 @chenhengjie123 哇塞,可以做到一台mac 拖多台iPhone?

#70楼 @rogergan 因为和 UIAutomation 属于 instruments 的一部分不同,WDA 是通过 xcodebuild 命令启动的,而 xcodebuild 是可以多开的。

PS:不要歪楼了。。。这个帖子主要说 Xcode 8 和 iOS 10

@Tank007 这个问题解决了嘛?我也遇到了类似问题

#68楼 @Tank007 这个问题已经解决,主要是webdriveragent下载依赖时,由于没有,导致一些依赖下载不下来,lantern后,再次运行问题解决

或者,也可以直接到 appium 安装目录下的appium-xcuitest-driver -->webDriverAgent ,运行命令./Scripts/bootstrap.sh,来下载依赖

一定要先***呃

@Lihuazhang
capabilities.setCapability("automationName", "XCUITest"); 报错:

raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): automationName XCUITest not part of Appium,Selendroid,WebDriverAgent.

恒温 #75 · November 21, 2016 作者

#74楼 @miaomiao413 看出错日志呀。

#73楼 @nanccy 嗯,是的,我也是***后解决的

@Lihuazhang 只有这些日志没看出啥

[BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): automationName XCUITest not part of Appium,Selendroid,WebDriverAgent.
at IosDriver.validateDesiredCaps (lib/basedriver/driver.js:120:25)
at IosDriver.validateDesiredCaps (lib/driver.js:40:16)
at IosDriver.callee$0$0$ (lib/basedriver/commands/session.js:14:8)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.callee$0$0 as createSession
at IosDriver.createSession$ (lib/driver.js:40:16)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at IosDriver.createSession (lib/driver.js:110:19)
at AppiumDriver.createSession$ (lib/appium.js:121:43)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js💯2
[HTTP] <-- POST /wd/hub/session 500 134 ms - 241

1)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) as next
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
{ [SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): automationName XCUITest not part of Appium,Selendroid,WebDriverAgent.] jsonwpCode: 33 }

恒温 #78 · November 21, 2016 作者

automationName XCUITest not part of Appium,Selendroid,WebDriverAgent

@Lihuazhang 看到这个错误是不知道怎么解决,1.6按照 “Appium 1.6 ios 无缝升级“装好了

#58楼 @joliylee
#26楼 @sanlengjingvv

改这一行的不起作用 CODE_SIGN_IDENTITY[sdk=iphoneos*],不过不影响打包,想搞清楚这用替换内容中有双引号的该怎么替换,试过很多次改不过来这一行

#80楼 @Chihpin

把你的命令贴出来呀,我这样双引号没影响

sed -i ""  s/'"CODE_SIGN_IDENTITY\[sdk=iphoneos\*\]" = ".*";'/'"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: SHANGHAI TESTER HOME GROUP CO., LTD.";'/g Testerhome.xcodeproj/project.pbxproj

#20楼 @gavingao 1.6beta版for mac哪里下?githtub下源码吗?

driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[1]")).click();

org.openqa.selenium.WebDriverException: org.openqa.selenium.remote.JsonException: JSON command: Parameters were incorrect. We wanted {"required":["using","value"]} and you sent []

而且一分钟左右模拟器就会重启不知道为什么,求大神

#54楼 @Lihuazhang 目前有基于XCUITesting的monkey方案吗?有没有好的开源xcode8 上的稳定性测试工具?

我用xcrun simctl install booted +app路径 把app安装到xcode模拟器上 结果总是报错:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.

恒温 #86 · December 22, 2016 作者

#85楼 @lynn_qin adb devices 是找android的。 xcrun simctl install booted +app路径是ios,哥们你到底在测试啥?

87Floor has been deleted
88Floor has been deleted

#86楼 @Lihuazhang iOS 请忽略adb devices

已解决。。。是我装错了app

Testing failed:

[Xcode] Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'
** TEST FAILED **

xcode 8 appnium 1.6.1 ,确认都已经签名,WebDriverAgentRunner下也已经签名。。但一直报这个错,其他人有遇到过吗

#91楼 @huhutouch 你这个问题解决了吗?

#54楼 @Lihuazhang 能给个能用的指导文档吗?现在ios10 的monkey测试还没搞定

#84楼 @jira 同求 ios10 monkey测试方案,谢谢

#69楼 @chenhengjie123 有支持ios10 的monkey方案吗?

恒温 回复

这个swiftmonkey搞起来有点复杂,我在网上找了一个简单的,也是用swift跑monkey,就是效率很低,点击几乎是完全随机的,有效点击太少,而且一段出错就无法再次启动,而且要源码,想用appium自己写个自动化脚本跑monkey,现在卡在环境搭建上,之前用appium1.5.x,环境用例是可以正常跑起来的

98Floor has been deleted

报错如下:

16:40:19.737 xcodebuild[81666:1571339] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
16:40:19.739 xcodebuild[81666:1571339] Initializing test infrastructure.
16:40:19.928 xcodebuild[81666:1571354] Creating the test bundle connection.
16:40:19.928 xcodebuild[81666:1571354] Listening for proxy connection request from the test bundle (all platforms)
16:40:19.928 xcodebuild[81666:1571354] Resuming the connection.
16:40:19.929 xcodebuild[81666:1571354] Test connection requires daemon assistance.
16:40:19.929 xcodebuild[81666:1571339] Starting test session with ID 72A0A106-1EC4-46C0-8DC8-044AF948BD6D
16:40:19.929 xcodebuild[81666:1571339] Checking test manager availability..., will wait up to 120s
16:40:19.954 xcodebuild[81666:1571339] Test operation failure: Test operation was canceled.
16:40:19.954 xcodebuild[81666:1571339] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled." UserInfo={NSLocalizedDescription=Test operation was canceled.} didCancel: 1
momoko 回复

同问,这个问题解决了吗

Wang 回复

依赖我已经下载了,但是报WebDriverAgent 需要一个team,然后就用自己的apple id重新编译了下,现在还是报错,提示profile问题,怎么破?

2017-03-09 07:23:51:463 - [Xcode] 2017-03-09 15:23:51.462 xcodebuild[93169:1983424] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fdd86a6e980>

2017-03-09 07:23:51:463 - [Xcode] Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'

2017-03-09 07:23:51:464 - [Xcode]

2017-03-09 07:23:51:466 - [Xcode]
Testing failed:
No profiles for 'com.facebook.WebDriverAgentRunner' were found: Xcode couldn't find a provisioning profile matching 'com.facebook.WebDriverAgentRunner'.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'
** TEST FAILED **


The following build commands failed:
Check dependencies
(1 failure)
Jackey 回复

原文“Go to your appium installed path and go node_modules/appium-xcuitest-driver/WebDriverAgent and run bash Scripts/bootstrap.sh -d”
即在WebDriverAgent的目录下单独运行$bash Scripts/bootstrap.sh -d
如果还是不行
$brew uninstall carthage(bin里的carthage软链也要删掉)
$brew install carthage
$bash Scripts/bootstrap.sh -d

lightlymood 回复

请问问题解决了吗?我是Android自动化也遇到了相同问题

Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.3'
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.3'

Testing failed:
Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.3'
Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/lillian/Library/Developer/Xcode/DerivedData/WebDriverAgent-cugadjxaiofygzgpwawfegxnduse/Logs/Test/57EE696B-0562-4594-8B40-65E6937EA3CC/Session-WebDriverAgentRunner-2017-05-23_090536-eJNiMH.log
** TEST FAILED **

谁遇到过这个问题吗

huhu 回复

请问你的问题解决了吗

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up