ruby on rails 3 - Capybara Poltergeist/PhantomJS testing - disable javascript on a page -
on of projects javascript intensive, have <noscript>
alert users might come in javascript disable on browsers.
i'm trying write test test suite validates behavior, can't figure out how tell capybara/poltergeist (which use feature tests) disable javascript before making requests. can't find clear in documentation. has else run this?
so, still have no idea how in poltergeist, figured out how set in selenium:
capybara.register_driver :selenium_firefox_nojs |app| profile = selenium::webdriver::firefox::profile.new profile["javascript.enabled"] = false capybara::selenium::driver.new(app, :browser => :firefox, :profile => profile) end
Comments
Post a Comment