I am running WebDriver tests in Python on Firefox. I have configured my Firefox to make sure all the links of social networking sites are opened in the current tab. I specifically made following two changes
browser.link.open_newwindow.restriction then, change the value to 0 (zero)
browser.link.open_newwindow and change the value to 1 (one)
It can be found in https://support.mozilla.org/en-US/questions/970999.
My WebDriver Firefox setup consists of
from selenium.webdriver.firefox.webdriver import WebDriver
from selenium.webdriver.common.action_chains import ActionChains
success = True
wd = WebDriver()
wd.implicitly_wait(60)
How do I also add the settings to the above setup before starting the test code?
Edit
I get the following error when I try to change value of browser.link.open_newwindow
Exception in thread "main" java.lang.IllegalArgumentException: Preference browser.link.open_newwindow may not be overridden: frozen value=2, requested value=1
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:120)
at org.openqa.selenium.firefox.Preferences.checkPreference(Preferences.java:223)
at org.openqa.selenium.firefox.Preferences.setPreference(Preferences.java:161)
at org.openqa.selenium.firefox.FirefoxProfile.setPreference(FirefoxProfile.java:230)
at tmp.main(tmp.java:21)