2017-10-18 46 views
-3

我想在VS代碼中使用這個命令來安裝硒獨立:我試圖安裝硒獨立

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**** 

** 
+0

你需要把文件夾中硒的獨立內部PATH環境變量 – yong

+0

@永我累了它,但仍然無法正常工作:/ – einszweidrei

+0

你能告訴我你在哪裏得到這個命令指南安裝硒單機? – yong

回答

0

您需要安裝硒獨立作爲全局包,然後將全局包安裝文件夾附加到PATH環境變量中。

  1. 執行「故宮安裝-g硒孤立」
  2. 執行「NPM配置得到前綴」,將打印出來的文件夾路徑,複製這條道路和開放「Envirormen變量」從Windows控制面板設置對話框或右鍵菜單:'我的電腦'的'屬性'。
  3. 在'PATH'Envirormen Variable的當前值末尾添加分號,然後追加上面的路徑。
  4. 打開新的終端執行「硒的獨立安裝」(老打開終端不執行命令)

enter image description here