Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
My default (initial) firefox profile does not match the profile expected from the robot tests. Its a bit unusual, so lets start with the error message I got from the test:
Here we have (system wide) a branded FFox profile (maintained by the admin). It consists of:
If I run the browser session interactive
I see the (german) dialog pops up, asking me if I prefer EN language for privacy reason:
This message appears every time a FFox Instance is started initial (without a profile). This is also, what happens when running the robot tests.
To continue work and running test, for the first I removed the
I researched a bit and fond this:
ATM i am a bit baffled, I even do not know if I on the wrong track .. any ideas?
Thanks for any suggestion.
Browser function is basically:
def Browser(driver_name="firefox", retry_count=3, *args, **kwargs): return get_driver(FirefoxWebDriver, *args, **kwargs)
from selenium import webdriver from selenium.webdriver.firefox.options import Options ... firefox_profile = webdriver.FirefoxProfile() firefox_profile.set_preference('browser.preferences.instantApply', True) ... firefox_profile.update_preferences() options = Options() options.add_argument('--headless') driver = webdriver.Firefox(options=options, firefox_profile=firefox_profile, service_log_path=get_geckodriver_file_name())
Not sure if it is possible to ignore the .js file, but at least to replace the important values.
@dalf thanks for your suggestions ..
I digged a bit deeper, from what I can say now:
Is there a way to install local firefox binary which is used only by the test environment and does not depend on the firefox from the package manager?
Is there a (simple) way to fake