Linux 无法在Ubuntu命令行中启动WebDrivero
我按照以下步骤在linux机器(Ubuntu)上安装WebdriverLinux 无法在Ubuntu命令行中启动WebDrivero,linux,selenium,ubuntu,error-handling,webdriver-io,Linux,Selenium,Ubuntu,Error Handling,Webdriver Io,我按照以下步骤在linux机器(Ubuntu)上安装Webdriver 创建目录:mkdir-webdriverio测试和&cd-webdriverio测试 下载selenium独立服务器: curl-Ohttp://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar 下载gheckodriver: curl-Lhttps://github.com/mozilla/geckodriv
- 创建目录:
mkdir-webdriverio测试和&cd-webdriverio测试
- 下载selenium独立服务器:
curl-Ohttp://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
- 下载gheckodriver:
curl-Lhttps://github.com/mozilla/geckodriver/releases/download/v0.16.0/geckodriver-v0.16.0-linux64.tar.gz |tar xz
- 启动SeleniumWebDriver:
java-jar-Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar
- 创建
脚本:test.js
- 最后,在另一个窗口中运行
时,在另一个终端窗口中运行上述脚本selenium server standalone
- 堆栈跟踪错误:
1.转到包含测试的文件夹:
cd webdriverio-test
2.下载chromedriver:
wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
./chromedriver -port=4444 -url-base=/wd/hub -verbose
3.启动chromedriver:
wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
./chromedriver -port=4444 -url-base=/wd/hub -verbose
4.打开新终端窗口并运行测试:
node test.js
感谢您提出的宝贵建议,但我成功地将selenium standalone和gecko驱动程序版本更改为最新版本。