错误:找不到:java用法:硒独立操作[选项]

尝试独立安装selenium,但收到此错误,知道吗?

# put the words you want to match into a list
word_list = ["eat","car","house","pick up","child"]

# get input text from the user 
user_prompt = input("Please enter some text: ")

# loop over each word in word_list and check if it is a substring of user_prompt
for word in word_list:
    if word in user_prompt:
        print("{} is in the user string".format(word))

我已经安装了Java,但是不知道它是否需要位于特定的文件位置。

$ ./node_modules/.bin/selenium-standalone install

not found: java
Usage: selenium-standalone action [options]

应该安装它,然后我才能启动它。

PEIYOUXIANG 回答:错误:找不到:java用法:硒独立操作[选项]

您提到安装了Java,但没有提到Java是否在PATH环境变量中。添加一个JAVA_HOME环境变量,然后将%JAVA_HOME%\bin添加到您的PATH环境变量中。

,

因为它清楚显示了使用错误Usage: selenium-standalone action [options] 可能是,您可能没有在selenium-standalone命令后传递任何参数。或正在传递newLine /换行符

尝试给予或一次性输入以下内容,然后按Enter键

./node_modules/.bin/selenium-standalone install

应该工作正常。

有关更多信息,请参考https://www.npmjs.com/package/selenium-standalone

本文链接:https://www.f2er.com/3150223.html

大家都在问