我正在尝试启动 ios-server 以使用 selenium:
java -jar ~/Downloads/ios-server-standalone-0.6.6-SNAPSHOT.jar -aut ~/Downloads/InternationalMountains.app -port 6666
但它没有启动:
30:01:831 INFO ApplicationStore.<init> App archive
folder:/Users/user/applications
version:663b7cc0a7a48ff629b1bcb39bbd78aed1c1e560
Beta features enabled (enabled by -real flag): false
Simulator enabled : true
Inspector: http://0.0.0.0:6666/inspector/
Tests can access the server at http://0.0.0.0:6666/wd/hub
Server status: http://0.0.0.0:6666/wd/hub/status
Connected devices: http://0.0.0.0:6666/wd/hub/devices/all
Applications: http://0.0.0.0:6666/wd/hub/applications/all
Capabilities: http://0.0.0.0:6666/wd/hub/capabilities/all
Monitoring '/Users/user/applications' for new applications
Archived apps: /Users/user/applications
Build info: ios-driver 0.6.6-SNAPSHOT (built:20141009-1559,sha:663b7cc0a7a48ff629b1bcb39bbd78aed1c1e560)
Running on: Mac OS X 10.10.3 (x86_64)
Using java: 1.7.0_45
Using Xcode install: /Applications/Xcode.app
Using instruments: version:6.3, build: 57536
Using iOS version 8.3
iOS >= 6.0. Safari and hybrid apps are supported.
Applications :
CFBundleName=InternationalMountains,CFBundleVersion=1.0,/Users/user/Downloads/InternationalMountains.app
CFBundleName=Safari,CFBundleVersion=600.1.4,/Users/user/.ios-driver/safariCopies/safari-8.3.app
2015-04-10 15:30:02.843:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
2015-04-10 15:30:02.896:INFO:oejs.AbstractConnector:Started [email protected]:6666
30:02:899 SEVERE IOSServer.main cannot start ios-driver server.org.openqa.selenium.WebDriverException: cannot load the metadata from the Info.plist file for /Users/user/applications/Aspera Connect.app
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'lhc', ip: '198.105.244.228', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.7.0_45'
Driver info: driver.version: unknown
at org.uiautomation.ios.application.APPIOSApplication.<init>(APPIOSApplication.java:84)
at org.uiautomation.ios.application.APPIOSApplication.createFrom(APPIOSApplication.java:584)
at org.uiautomation.ios.utils.FolderMonitor.addApplication(FolderMonitor.java:140)
at org.uiautomation.ios.utils.FolderMonitor.init(FolderMonitor.java:70)
at org.uiautomation.ios.utils.FolderMonitor.<init>(FolderMonitor.java:49)
at org.uiautomation.ios.IOSServer.startFolderMonitor(IOSServer.java:273)
at org.uiautomation.ios.IOSServer.start(IOSServer.java:266)
at org.uiautomation.ios.IOSServer.main(IOSServer.java:104)
2015-04-10 15:30:03.007:INFO:oejsh.ContextHandler:stopped o.e.j.s.ServletContextHandler{/,null}
2015-04-10 15:30:03.008:INFO:oejsh.ContextHandler:stopped o.e.j.s.ServletContextHandler{/static,null}
2015-04-10 15:30:03.009:INFO:oejsh.ContextHandler:stopped o.e.j.s.ServletContextHandler{/wd/hub,null}
我不知道这有什么问题。有人能给出建议吗?谢谢
答案1
您的错误是:
IOSServer.main 无法启动 ios-driver server.org.openqa.selenium.WebDriverException:无法从 Info.plist 文件加载元数据对于 /Users/user/applications/Aspera Connect.app
因此看起来Info.plist
文件丢失或损坏(不是 JSON)格式。
代码负责装载Info.plist
:
private JSONObject getFullPlist() throws Exception {
File plist = new File(app, "Info.plist");
PlistFileUtils util = new PlistFileUtils(plist);
return util.toJSON();
}
相似的东西:iOS 驱动程序设置错误