谁能告诉我 Appium GUI 必须有一个 safari 启动器吗?如果没有,我如何将此启动器添加到 appium?
我试图添加它。我尝试从 github ( https://github.com/budhash/SafariLauncher ) 编译项目并将编译后的存档放入 appium。
当我尝试使用它时 - Safari 已启动,但出现错误,启动器找不到按钮。
我需要做什么?
感谢和问候
控制台日志
error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
info: [debug] Error: Error. Could not find button to launch Safari. Make sure you are using the latest version of SafariLauncher that appium is using
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/safari.js:70:17)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:77:12)
at [object Object].iOSController.handleFindCb (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:313:5)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios-controller.js:138:14)
at next (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:798:43)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/async/lib/async.js:32:16
at [object Object].exports.respond (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:28:9)
at [object Object]. (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/ios/ios.js:1498:18)
at getResultAndSendNext (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/lib/command-proxy.js:146:20)
at Socket. (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-uiauto/lib/command-proxy.js:88:7)
at Socket.emit (events.js:129:20)
at streamreadable.js:908:16
at process._tickDomainCallback (node.js:381:11)
我的 java 代码:
public static void main(String[] args) {
DesiredCapabilities safari = new DesiredCapabilities();
safari.setCapability("browser", "Safari");
safari.setCapability("platformName", "iOS");
safari.setCapability("deviceName", "iPod asolovei");
AppiumDriver driver = null;
System.out.println("Before connect to server");
try {
driver = new IOSDriver(new URL("http://192.168.10.42:4723/wd/hub"), safari);
} catch (MalformedURLException ex) {
System.out.println(ex.getMessage());
}
System.out.println("After connect to server");
driver.get("http://www.google.com/");
System.out.println(driver.getTitle());
driver.quit();
}
Best Answer-推荐答案 strong>
看起来配置文件有问题。
访问这里 https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793
这个帖子有相同的解决方案。
关于java - AppiumGUI 中的 Appium 启动器,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/34355270/
|