无法连接到Mozilla geckodriver 127.0.0.1:4444(Selenium :: WebDriver :: Error :: WebDriverError)
答案 0 :(得分: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组合。我昨天在这个问题上挣扎了好几个小时,在拉了很多毕业生之后,这个组合对我有用。我希望它有所帮助。