说你设备找不到,你看看 adb devices 里面有没
#17 楼 @jimneylee 多谢支持,加个头像?
我在面现在这家公司的时候,面试官说 30,一般都是选型的时候,你选什么? 我说我是走技术和管理并行的,但是如果一定要选,那我会放弃管理。
但是技术这东西,更新实在太快了。年纪越大,越应接不暇,有了家庭,有了孩子,不能出差,也不能一门心思的加班。
#3 楼 @xiaomayi0323 嗯 用 logElementTree() 看一把就可以了。
加个头像,会更加好哦。另外能介绍下工作地点之类的么?
ios 可以。 Android 还不行
亲,加个头像吧
curl -L https://developer.apple.com/library/ios/samplecode/UICatalog/UICatalog.zip -o ./sample-code/apps/UICatalog.zip
#2 楼 @mingway_hu 我想请你来讲下第三期的公开课 =,来说说性能测试这块怎样?
#1 楼 @lizhenghuan 以为你自己加好了。。
提示一下,第一关是 foo
//setup the web driver and launch the webview app.
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("device", "iPhone Simulator");
desiredCapabilities.setCapability("app", "/Users/Apple/code/SafariLauncher/build/Debug-iphoneos/SafariLauncher.app");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
RemoteWebDriver remoteWebDriver = new RemoteWebDriver(url, desiredCapabilities);
Thread.sleep(10000);
//switch to the latest web view
for(String winHandle : remoteWebDriver.getWindowHandles()){
remoteWebDriver.switchTo().window(winHandle);
}
remoteWebDriver.get("http://saucelabs.com/test/guinea-pig");
//Interact with the elements on the guinea-pig page using id.
WebElement div = remoteWebDriver.findElement(By.id("i_am_an_id"));
remoteWebDriver.findElement(By.id("comments")).sendKeys("My comment"); //populate the comments field by id.
//leave the webview to go back to native app.
remoteWebDriver.executeScript("mobile: leaveWebView");
//close the app.
remoteWebDriver.quit();
加个头像~
#2 楼 @rattlesnake 上次@seveniruby 说 4.4 暂时还没支持,可能有这个问题。 你试试看 4.3 的模拟器?
Required platform does
n't exist (API level >= 17)
说需要 API level >= 17
#21 楼 @spikeshen 什么是软等待?
是因为 https 拿不到。
WebDriver 同样使用 XPATH 和 CSS locator。孰优孰劣,google 一下,一大把,不过目前风向偏向 CSS, 理由如下
更快 (尤其在 IE 上)
更简单
更加可读
符合 Jquery 定位逻辑
XPATH 在不同浏览器上的实现可能不太一样,也许在 Firefox 工作,在 IE 上就不一定了。
CSS 可以引入第三方的 Javascript 库来更好的定位元素, 比如马上要说的 Sizzle.js