Skip to content

Instantly share code, notes, and snippets.

@jdenen
Created April 19, 2015 19:35
Show Gist options
  • Save jdenen/4ab735d962597a6bd396 to your computer and use it in GitHub Desktop.
Save jdenen/4ab735d962597a6bd396 to your computer and use it in GitHub Desktop.
Automate a browser with JavaScript disabled
require "watir-webdriver"
# Create a Firefox profile and disabled JavaScript
profile = Selenium::WebDriver::Firefox::Profile.new
profile["javascript.enabled"] = false
# Instantiate a browser instance using the profile you created above
browser = Watir::Browser.new :firefox, :profile => profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment