launch selenium from python on ubuntu

后端 未结 2 1244
情话喂你
情话喂你 2020-12-18 15:57

I have the following script

from selenium import webdriver

browser = webdriver.Firefox()
browser.get(\'http://localhost:8000\')

assert \'Django\' in browse         


        
2条回答
  •  心在旅途
    2020-12-18 16:27

    The last version of Firefox is not working properly with selenium. Try with 46 or 45.

    You can download here: ftp.mozilla.org/pub/firefox/releases

    or sudo apt-get install firefox=45.0.2+build1-0ubuntu1

    You can also do this graphically as shown here http://www.howtogeek.com/117929/how-to-downgrade-packages-on-ubuntu/

提交回复
热议问题