【问题标题】:Unable to launch appium server programmatically under sandbox with eclipse editor无法使用 Eclipse 编辑器在沙箱下以编程方式启动 appium 服务器
【发布时间】:2019-06-04 18:45:34
【问题描述】:

我们正在尝试使用 Eclipse 编辑器在沙箱下构建 Appium 项目,但无法从运行配置下的 Eclipse 环境变量选项卡中设置 APPIUM_PATH 和 NODE_PATH 值

在为 APPIUM_PATH 和 NODE_PATH 设置环境变量后,我们仍然遇到错误

Caused by:

io.appium.java_client.service.local.InvalidNodeJSInstance: Node.js
is not installed!   at
io.appium.java_client.service.local.AppiumServiceBuilder.findDefaultExecutable(AppiumServiceBuilder.java:197)
    at
org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:346)
    at
io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:71)
    at
tomtom.gta.test.common.WebDriverManager.<clinit>(WebDriverManager.java:23)
    ... 40 more Caused by: java.lang.NullPointerException: Unable to
find executable for: node   at
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:987)
    at org.openqa.selenium.os.OsProcess.<init>(OsProcess.java:63)   at
org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:38)  at
io.appium.java_client.service.local.AppiumServiceBuilder.findDefaultExecutable(AppiumServiceBuilder.java:193)*

在这里我可以看到我们得到了一个例外,因为 Node 没有安装或无效但手动我可以看到 node 已成功安装,并且路径或环境变量在 eclipse 上也是正确的

【问题讨论】:

  • 你能在终端运行 appium 吗?

标签: java eclipse appium ubuntu-16.04 sandbox


【解决方案1】:

似乎是 node 和 appium 安装的问题。 请关注节点安装:https://nodejs.org/en/download/package-manager/#windows

通过 npm 安装 appium:npm install -g appium

您还可以安装 appium doctor 以检查系统中的一切是否正常:npm install appium-doctor appium-doctor

现在启动 appium doctor 并检查所有内容。您还需要在 Eclipse 中设置正确的节点路径。

【讨论】:

    猜你喜欢
    • 2019-07-15
    • 2018-10-07
    • 2021-04-13
    • 2017-10-22
    • 2020-01-15
    • 1970-01-01
    • 2019-01-14
    • 2018-11-04
    • 2018-10-14
    相关资源
    最近更新 更多