我正在尝试安装selenium单机版

我正在尝试安装selenium单机版,selenium,Selenium,我正在尝试在vs代码中使用以下命令安装selenium standalone: selenium-standalone install 但它显示了以下错误: ** selenium-standalone install selenium-standalone : The term 'selenium-standalone' is not recognized as the name of a cmdlet, function, script file, or operable

我正在尝试在vs代码中使用以下命令安装selenium standalone:

selenium-standalone install
但它显示了以下错误:

 **

selenium-standalone install    selenium-standalone : The term 'selenium-standalone' is not recognized as the name of a cmdlet, function, script file, or    operable program. Check the spelling of the name, or if a path was    included, verify that    the path is correct and try again.    At line:1 char:1    + selenium-standalone install    + ~~~~~~~~~~~~~~~~~~~
       + CategoryInfo          : ObjectNotFound: (selenium-standalone:String) [], CommandNotFoundException
       + FullyQualifiedErrorId : CommandNotFoundException****strong text****

**

您需要将selenium standalone作为全局软件包安装,然后将全局软件包安装文件夹附加到PATH Envirormen变量中

  • 执行“npm安装-g selenium standalone”
  • 执行“npm config get prefix”,它将打印出文件夹路径,复制此路径并从Windows控制面板或“我的电脑”的右菜单“属性”打开“环境变量”设置对话框
  • 在“PATH”环境变量的当前值末尾添加分号,然后在PATH上方追加
  • 打开新终端以执行“selenium standalone install”(不要在旧的打开终端上执行命令)

  • 您需要将selenium standalone所在的文件夹放到PATH环境中variable@yong我厌倦了,但仍然无法使用:/n您能告诉我从哪里获得此命令指南以安装selenium standalone吗?以下是源代码: