1
有人可以告訴我,Appium GUI必須有Safari瀏覽器啓動器嗎?如果沒有,我該如何將這個啓動器添加到appium? 我試圖添加它。我試圖從github編譯項目(https://github.com/budhash/SafariLauncher),並將編譯後的文件歸檔到appium。 當我嘗試使用它時 - safari已啓動,但出現錯誤,啓動程序無法找到該按鈕。 我需要做什麼?AppiumGUI中的Appium啓動器
感謝&問候
控制檯日誌
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();
}