LoginSignup
3
3

More than 5 years have passed since last update.

Selenium WebDriver + Firefox49(暫定)(Python)

Posted at

うおーFirefoxのバージョン上げたらSelenium動かない死ぬしかないしこのままでは楽しい週末を送れない! と思って調べました。あ、Pythonです。

Selenium 2系だと動かない?
一応いまのところ(2016/9/29時点)うまく行っている方法がこれです。

Selenium 3.0.0b3 に上げて、geckodriver入れる。

wget https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-linux64.tar.gz
tar xzvf geckodriver-v0.10.0-linux64.tar.gz
cp geckodriver /usr/bin/
pip install selenium==3.0.0b3

これの通りにやった。
https://github.com/SeleniumHQ/selenium/issues/2739#issuecomment-250112599

謎の例外が出る対応

それでも、get_attribute とかすると謎の例外が出る。

WebDriverException: Message: SyntaxError: missing ) in parenthetical

Seleniumのバージョン上がって使い方変わったのかなあ、とか思って調べてたら、Selenium 3.0.0b3のバグらしいので直す。

誰かプルリクあげてんのかな。

おしまお。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3