Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Selenium: getting rid of Firefox first run screen

Currently my py.test + splinter + pytest-splinter tests load a Firefox welcome screen when browser instance is created:

enter image description here

How one can get rid of this and have about:blank as a starting page as this screen is wasting some time and bandwidth on each test run?

like image 536
Mikko Ohtamaa Avatar asked May 27 '26 11:05

Mikko Ohtamaa


1 Answers

Set startup.homepage_welcome_url.additional property to '':

In [1]: from selenium import webdriver

In [2]: profile = webdriver.FirefoxProfile()

In [3]: profile.set_preference('startup.homepage_welcome_url.additional', '')

In [4]: browser = webdriver.Firefox(profile)
like image 71
drets Avatar answered May 30 '26 08:05

drets