遇到了,求教这个怎么解。。。
最近想搭一个 iOS8.x 自动化的环境,appium desktop1.5.3+xcode7.3 是可以的是么?正在下载中,请前辈指教~
感谢楼主分享,能成功运行了,但是怎么能判定 app 的 crash 问题呢?不需要解析 ips 具体内容,能简单知道执行过程中 crash 了多少次就行
好的,多谢大神帮我解惑
使用的版本是 AppCrawler 2.1.3 + appium 1.7.2
我用的是 Appium+python,Mac 开启了多个端口的 appium server,但是链接俩设备后,不管 desired_caps 怎么指定 udid,都只能调起其中一台设备(最近使用过的那台),这是什么原因呢?
获取 iOS 的界面经常超时啊 😢
发现跟页面元素多少有关,尤其是 iOS 的页面,尤其慢,但是用 appium inspector 时间虽长还是能最终获取页面的,读了下源码,超时日志是在 WebDriver.scala 输出的:
def asyncTask[T](timeout: Int = 30, restart: Boolean = false)(callback: => T): Option[T] = {
Try({
val task = Executors.newSingleThreadExecutor().submit(new Callable[T]() {
def call(): T = {
callback
}
})
if(timeout<0){
task.get()
}else {
task.get(timeout, TimeUnit.SECONDS)
}
}) match {
case Success(v) => {
appiumExecResults.append("success")
Some(v)
}
case Failure(e) => {
e match {
case e: TimeoutException => {
log.error(s"${timeout} seconds timeout") //----这里!这里!
appiumExecResults.append("timeout")
}
case _ => {
@seveniruby 思寒大神,我也想问这个——社区里基于 uiaotumator 的遍历工具
capability 中加上这个 automationName: XCUITest 参数
遇到了同样的问题
2018-05-15 12:36:24 INFO [Crawler.start.135] waiting for app load
2018-05-15 12:36:32 INFO [Crawler.start.137] driver=null
2018-05-15 12:36:32 INFO [Crawler.start.138] get screen info
2018-05-15 12:36:33 INFO [AppiumClient.getDeviceInfo.214] screenWidth=1024 screenHeight=768
2018-05-15 12:36:33 INFO [Crawler.refreshPage.537] refresh page
2018-05-15 12:36:53 ERROR [AppiumClient.asyncTask.146] 20 seconds timeout
2018-05-15 12:37:13 ERROR [AppiumClient.asyncTask.146] 20 seconds timeout
2018-05-15 12:37:33 ERROR [AppiumClient.asyncTask.146] 20 seconds timeout
Exception in thread "main" java.lang.NullPointerException
at scala.collection.immutable.StringOps$.length$extension(StringOps.scala:48)
at scala.collection.immutable.StringOps.length(StringOps.scala:48)
at scala.collection.IndexedSeqOptimized$class.isEmpty(IndexedSeqOptimized.scala:27)
at scala.collection.immutable.StringOps.isEmpty(StringOps.scala:30)
at scala.collection.TraversableOnce$class.nonEmpty(TraversableOnce.scala:109)
at scala.collection.immutable.StringOps.nonEmpty(StringOps.scala:30)
at com.testerhome.appcrawler.Crawler.refreshPage(Crawler.scala:541)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:140)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:342)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:310)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:90)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
Appium 日志:
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["270dfaf3-4a1f-4f94-8528-187851c6e818"]
[XCUITest] Executing command 'getPageSource'
[JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/C2D926F9-396F-43E5-9819-AFC5FBAE63DA/source] with no body
[HTTP] --> GET /wd/hub/session/270dfaf3-4a1f-4f94-8528-187851c6e818/source
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["270dfaf3-4a1f-4f94-8528-187851c6e818"]
[XCUITest] Executing command 'getPageSource'
[HTTP] --> GET /wd/hub/session/270dfaf3-4a1f-4f94-8528-187851c6e818/source
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getPageSource() with args: ["270dfaf3-4a1f-4f94-8528-187851c6e818"]
[XCUITest] Executing command 'getPageSource'
[JSONWP Proxy] Got response with status 200: "{\n \"value\" : \"\\n\\n \\n \\n \\n \\n
[JSONWP Proxy] Proxying [GET /source] to [GET http://localhost:8100/session/C2D926F9-396F-43E5-9819-AFC5FBAE63DA/source] with no body
[MJSONWP] Responding to client with driver.getPageSource() result: "\n \n \n \n \n \n
学习了一下 appcrawler,奈何源码是 Scala 的,看起来比较吃力,非常期待您的 java 版 UIcrawler 源码,BTW,后续要是也能支持自己写插件就更好了,楼主加油!