How can I add preferences to the browser so it launches without javascript?
2 Answers
Try setting firefox's profile to disable the javascript:
from selenium import webdriver
fp = webdriver.FirefoxProfile()
fp.set_preference("browser.download.folderList",2)
fp.set_preference("javascript.enabled", False)
browser = webdriver.Firefox(firefox_profile=fp)
To check in the webdriver browser if javascript is enabled do the following:
On the menubar navigate to Firefox > Preferences > Content and the check button for enable javascript should be unchecked. Like the picture shown below.

1 Comment
imrek
It doesn't work. If you check
about:config in your selenium driven Firefox instance, it still shows javascript.enabled true, and it executes javascript code.