示例里面的 wait 是来自 selenium.webdriver.support.ui
的,和你的不一样。
from selenium.webdriver.support.ui import WebDriverWait
涨知识了
赞~有收获、有总结、有分享,看到 Appium Girls 活动能帮到众多妹子真是太好啦。
可以试试 测试开发之路 ---- 可读性,可维护性,可扩展性 里提到的责任链模式,自己实现一个。
把 Appium server 完整的 log 输出贴上来。不要截图,直接复制粘贴文字。
我感觉你截图里面的 log 并不是包含出错信息的 log 。
#20 楼 @wenshi11019 给个具体界面截图吧?
额,想问下上下文是啥?
#17 楼 @wenshi11019 你说的是自绘控件吧?这个没试过。你有确定用了这类控件的 app 不?我可以装上试试
通过了。
PS:package name 和 app-activity 的获取方法你可以看看 appium 的实现。当你没给这两个参数时,它会通过解析 apk 文件自动获取这两个参数。
分享是好的。但麻烦使用 markdown 。
不会用的话可以看 排版说明 。好文章应该配上好的排版~
#5 楼 @wyb199026 其实那是个输入框,你可以把 9.3 输进去的。
正文不要出现公众号的二维码吧
Appium 客户端的 Inspector 最高只支持 8.4 的版本
这个不对吧,能支持 9.2 啊。我觉得是你启动参数里要求要用 8.4,而你机器上没有,所以报错。
你把你 iOS 启动的参数贴上来看看?
#14 楼 @wenshi11019 你是说获取屏幕截图?可以啊。inspector 就是这么获取到屏幕截图的啊。
#10 楼 @chenhengjie123 填坑方法:
# 分步走 bootstrap.sh 里面的步骤
$ carthage checkout
*** Checking out KissXML at "5.0.3"
*** Downloading ocmock.framework binary at "OCMock 3.2.2"
*** Checking out peertalk at "5a0495a7b7d81b68e25ea1933c755b677cb040da"
*** Checking out ocmock at "v3.2.2"
*** Checking out RoutingHTTPServer at "v1.0.0"
# 这步从原来的 carthage build ocmock --platform iOS 改为 carthage build --platform iOS
$ carthage build --platform iOS
*** xcodebuild output can be found in /var/folders/k4/f6dh0_b90yj3y3rws3mt7gxr0000gn/T/carthage-xcodebuild.6HnolN.log
*** Skipped building KissXML due to the error:
Dependency "KissXML" has no shared framework schemes for any of the platforms: iOS
If you believe this to be an error, please file an issue with the maintainers at https://github.com/robbiehanson/KissXML/issues/new
*** Skipped building RoutingHTTPServer due to the error:
Dependency "RoutingHTTPServer" has no shared framework schemes for any of the platforms: iOS
If you believe this to be an error, please file an issue with the maintainers at https://github.com/mattstevens/RoutingHTTPServer/issues/new
*** Building scheme "OCMock iOS" in OCMock.xcodeproj
*** Skipped building peertalk due to the error:
Dependency "peertalk" has no shared framework schemes for any of the platforms: iOS
If you believe this to be an error, please file an issue with the maintainers at https://github.com/rsms/peertalk/issues/new
2016-05-16 14:57:40.978 xcodebuild[20598:270057] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XActivatePowerMode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-05-16 14:57:42.707 xcodebuild[20636:270151] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XActivatePowerMode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
# 继续用原有脚本 build inspector
$ ./Scripts/bootstrap.sh -i
Building Inspector
Creating bundle directory...
Building inspector.js...
> web-driver-inspector@1.0.0 build /Users/hengjiechj/Personal/WebDriverAgent/Inspector
> webpack --progress --colors
Hash: 842186d690872be37d64
Version: webpack 1.12.2
Time: 2573ms
Asset Size Chunks Chunk Names
inspector.js 706 kB 0 [emitted] main
[0] multi main 28 bytes {0} [built]
+ 182 hidden modules
Done
另外,分别找了台 iOS 7 和 iOS 9.3 的真机鉴定。基本结论如下:
感觉有点像 Android 的 UIAutomator 。
我踩坑了。。。
$ ./Scripts/bootstrap.sh
Fetching dependencies
*** Checking out KissXML at "5.0.3"
*** Checking out peertalk at "5a0495a7b7d81b68e25ea1933c755b677cb040da"
*** Downloading ocmock.framework binary at "OCMock 3.2.2"
*** Checking out ocmock at "v3.2.2"
*** Checking out RoutingHTTPServer at "v1.0.0"
*** xcodebuild output can be found in /var/folders/k4/f6dh0_b90yj3y3rws3mt7gxr0000gn/T/carthage-xcodebuild.b0AqO1.log
Failed to read file or folder at /Users/hengjiechj/Personal/WebDriverAgent/ocmock/Cartfile: Error Domain=NSCocoaErrorDomain Code=260 "The file “Cartfile” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/hengjiechj/Personal/WebDriverAgent/ocmock/Cartfile, NSUnderlyingError=0x7f8c51e119a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
正在找解决方法。。。
赞~ 授人以鱼不如授人以渔啊~
请使用 markdown 。