Launching Selenium with JavaScript Disabled

[This article was first published on Python | datawookie, and kindly contributed to python-bloggers]. (You can report issue about the content on this page here)
Want to share your content on python-bloggers? click here.

I have a rather obscure situation where I want to launch Selenium… but with JavaScript disabled.

from selenium import webdriver
from import Options
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

After a bit of Googling it turns out that this is eminently possible by just setting some options prior to launching the browser.

chrome_options = Options()

Now create a browser instance.

browser = webdriver.Remote(

Head over to to check.


Looks good. Success!

Note: This has been tested with:

  • selenium/standalone-chrome-debug:3.141.
To leave a comment for the author, please follow the link and comment on their blog: Python | datawookie.

Want to share your content on python-bloggers? click here.