報錯Log:
<pre>
FAILED CONFIGURATION: @BeforeSuite globalSetup
io.appium.java_client.service.local.InvalidServerInstanceException: Invalid server instance exception has occured: There is no installed nodes! Please install node via NPM (https://www.npmjs.com/package/appium#using-node-js) or download and install Appium app (http://appium.io/downloads.html)
at io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:155)
at io.appium.java_client.service.local.AppiumServiceBuilder.checkAppiumJS(AppiumServiceBuilder.java:309)
at io.appium.java_client.service.local.AppiumServiceBuilder.createArgs(AppiumServiceBuilder.java:389)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:332)
at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:76)
at io.appium.java_client.service.local.AppiumDriverLocalService.buildDefaultService(AppiumDriverLocalService.java:72)
at org.sem.sample.example_code.BaseTest.globalSetup(BaseTest.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Caused by: java.io.IOException: C:\Users\Young\AppData\Roaming\npm\node_modules
at io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:156)
... 24 more
SKIPPED CONFIGURATION: @BeforeClass setUp
SKIPPED CONFIGURATION: @AfterClass tearDown
SKIPPED: testCreateSession
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 2
===============================================
===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 3
===============================================
[TestNG] Time taken by org.testng.reporters.jq.Main@60f82f98: 66 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@7a5d012c: 14 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@67b64c45: 121 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 22 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@6aaa5eb0: 10 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@380fb434: 7 ms
</pre>
這個問題在網(wǎng)上搜了搜大家基本上都是說要用命令行安裝Appium践瓷,這個辦法比較麻煩瞳收。
其實io.appium.java_client調用的是/usr/local/lib/node_modules這個路徑下的Appium伴郁,所以我們只需要做個軟鏈接,程序就可以跑通啦揽浙,比如:
cd /usr/local/lib/node_modules
ln -s /Applications/Appium.app/Contents/Resources/app/node_modules/appium/ appium
解決Appium 通過 AppiumDriverLocalSerivce 無法啟動 appium service 問題
最后編輯于 :
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
- 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來出吹,“玉大人遇伞,你說我怎么就攤上這事〈防危” “怎么了鸠珠?”我有些...
- 文/不壞的土叔 我叫張陵巍耗,是天一觀的道長。 經(jīng)常有香客問我渐排,道長炬太,這世上最難降的妖魔是什么? 我笑而不...
- 正文 為了忘掉前任飞盆,我火速辦了婚禮娄琉,結果婚禮上,老公的妹妹穿的比我還像新娘吓歇。我一直安慰自己孽水,他們只是感情好,可當我...
- 文/花漫 我一把揭開白布城看。 她就那樣靜靜地躺著女气,像睡著了一般。 火紅的嫁衣襯著肌膚如雪测柠。 梳的紋絲不亂的頭發(fā)上炼鞠,一...
- 文/蒼蘭香墨 我猛地睜開眼榛斯,長吁一口氣:“原來是場噩夢啊……” “哼观游!你這毒婦竟也來了?” 一聲冷哼從身側響起驮俗,我...
- 正文 年R本政府宣布,位于F島的核電站子库,受9級特大地震影響舱权,放射性物質發(fā)生泄漏。R本人自食惡果不足惜仑嗅,卻給世界環(huán)境...
- 文/蒙蒙 一宴倍、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧仓技,春花似錦鸵贬、人聲如沸。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至地沮,卻和暖如春嗜浮,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背摩疑。 一陣腳步聲響...
推薦閱讀更多精彩內(nèi)容
- testng控制臺輸出亂碼,解決方法不知道是否有用率寡,晚上再看:解決辦法是在eclipse的根目錄下迫卢,有個eclip...
- 首先環(huán)境的搭建,我是將zookeeper MongoDB redis 放在了203的服務器上,tomcat放在20...
- 問題分析: 問題一 org.apache.hadoop.ipc.RemoteException(org.apach...
- 錯誤詳細信息: 2018-06-01 15:31:07,769 INFO [Thread-71] org.apac...