-1

无法连接到 Mozilla geckodriver 127.0.0.1:4444 (Selenium::WebDriver::Error::WebDriverError)

4

1 回答 1

1
addons:
  firefox: 'latest'
before_script:
  - bin/setup
  - export PATH=$PATH:$HOME/travis_geckodriver/
  - firefox --version
install:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 3 # give xvfb some time to start
  - mkdir $HOME/travis_geckodriver/
  - cd $HOME/travis_geckodriver/
  - curl -L https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz | tar xvz
  - chmod +x geckodriver
  - "cd -"

这允许您使用最新的 selenium / firefox 组合。昨天我为此苦苦挣扎了好几个小时,在拉了许多离职者之后,这对我来说是有效的组合。我希望它有所帮助。

于 2016-11-21T22:59:20.980 回答