#33 楼 @532589730 hi, Instruments wants permission to analyze other processes xcode4.6.3 这个问题碰到过吗?谢谢。
我也是这个问题
多谢哈,我先升级下 xcode 再看看吧。
#3 楼 @532589730 那就是说 我要安装 xcode4.6 用 ios6 了。额
#35 楼 @532589730 那这样的话,xcode5.1 最高 ios7.1 了。
#33 楼 @532589730 ios 版本 需要 shell 下配置吗?
#31 楼 @532589730 用这个新定义的类型,就不通用了。
同样的代码, 也是 appium1.0 我同事那边 xcode4.6.4 竟然可以滑动。
我这边 没有 swipe 这个方法呢。
public WebDriver remoteWebDriver;
#28 楼 @532589730 这个 driver 是什么类型对象?
tomzhangc@tomMBP:searchappium$appium -v
1.0.0
#23 楼 @532589730 没有 swipe 这个 api
#21 楼 @seveniruby 好 我试试看。
final JavascriptExecutor js = (JavascriptExecutor) remoteWebDriver;
final Map<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "down");
//System.out.println("Scroll object:" + scrollObject.size());
for (int i = 0; i < 2; i++) {
js.executeScript("mobile: scroll", scrollObject);
}
TimeUnit.SECONDS.sleep(20);
另外, 我使用 safari 打开一个页面, 进行滑动操作。
#17 楼 @532589730
final JavascriptExecutor js = (JavascriptExecutor) remoteWebDriver;
final Map scrollObject = new HashMap();
scrollObject.put("direction", "down");
//System.out.println("Scroll object:" + scrollObject.size());
for (int i = 0; i < 2; i++) {
js.executeScript("mobile: scroll", scrollObject);
}
TimeUnit.SECONDS.sleep(20);
#14 楼 @532589730 额, 是有用 js.executeScript("mobile: scroll", scrollObject);
模拟器也没反应, case 最终报是 成功的。
但模拟器上看不到 滑动 的效果,准确的说是屏幕一直静止。
#9 楼 @seveniruby 我用的 1.0 版本, 看打印日志 Responding to client with success: {"status":0,"value":true 成功了吧。 模拟器竟然没反应?
#6 楼 @532589730 是呀, 我第二种方法用的 scroll 也看不到效果,
final JavascriptExecutor js = (JavascriptExecutor) remoteWebDriver;
final Map scrollObject = new HashMap();
scrollObject.put("direction", "down");
System.out.println("Scroll object:" + scrollObject.size());
for (int i = 0; i < 2; i++) {
js.executeScript("mobile: scroll", scrollObject);
}
TimeUnit.SECONDS.sleep(20);
#3 楼 @532589730 额, 那怎么办?
info: Responding to client with success: {"status":0,"value":"","sessionId":"75d0c61a-592b-41a4-bfe9-9d48febbb09c"}
POST /wd/hub/session/75d0c61a-592b-41a4-bfe9-9d48febbb09c/url 200 1506ms - 87b
debug: Appium request initiated at /wd/hub/session/75d0c61a-592b-41a4-bfe9-9d48febbb09c/execute
debug: Request received with params: {"args":[{"direction":"down"}],"script":"mobile: scroll"}
info: Pushing command to appium work queue: "au.scrollFirstView('Down')"
debug: Sending command to instruments: au.scrollFirstView('Down')
info: [INSTSERVER] Sending command to instruments: au.scrollFirstView('Down')
info: [INST] 2014-05-19 07:30:49 +0000 Debug: target.frontMostApp().elements()[1].elements()[2].scrollDown()
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":true}
info: Responding to client with success: {"status":0,"value":true,"sessionId":"75d0c61a-592b-41a4-bfe9-9d48febbb09c"}
POST /wd/hub/session/75d0c61a-592b-41a4-bfe9-9d48febbb09c/execute 200 289ms - 89b
debug: Appium request initiated at /wd/hub/session/75d0c61a-592b-41a4-bfe9-9d48febbb09c/execute
debug: Request received with params: {"args":[{"direction":"down"}],"script":"mobile: scroll"}
info: Pushing command to appium work queue: "au.scrollFirstView('Down')"
debug: Sending command to instruments: au.scrollFirstView('Down')
info: [INSTSERVER] Sending command to instruments: au.scrollFirstView('Down')
info: [INST] 2014-05-19 07:30:49 +0000 Debug: target.frontMostApp().elements()[1].elements()[2].scrollDown()
info: [INSTSERVER] Socket data received (50 bytes)
info: [INSTSERVER] Socket data being routed for 'cmd' event
info: [INSTSERVER] Got result from instruments: {"status":0,"value":true}
xcode 版本 5.1, ios 版本 7.1