Thursday, January 11, 2018

Integrating Firefox and Selenium Webdriver

I am posting this on my blog to remind me what to do if I have to integrate firefox, and selenium webdriver.

firstly, install selenium using pip.

and then, download the geckodriver that should be compatible / working with selenium webdriver.

In your code, if your python/django app is in virtualbox (headless mode),

it should be something like this:

-------------------------------------------------------------------------
#!/srv/onlinesystem/env/bin/python

from selenium import webdriver
from selenium.webdriver import FirefoxOptions

opts = FirefoxOptions()
opts.add_argument("--headless")
browser = webdriver.Firefox(firefox_options=opts)
browser.get('http://google.com')



1 comment:

  1. Thanks for sharing amazing information about python .Gain the knowledge and hands-on experience in python Online Training

    ReplyDelete

Integrating Firefox and Selenium Webdriver

I am posting this on my blog to remind me what to do if I have to integrate firefox, and selenium webdriver. firstly, install selenium usi...