Created
October 8, 2012 08:07
-
-
Save tacticiankerala/3851312 to your computer and use it in GitHub Desktop.
Ruby Code for running selenium test in firefox through a proxy. We use ZAP as proxy so that we will be notified with possible vulnerabilities exists in our app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "selenium-webdriver" | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
proxy = Selenium::WebDriver::Proxy.new(:http => "localhost:8080") | |
profile.proxy = proxy | |
driver = Selenium::WebDriver.for :firefox , :profile => profile | |
driver.navigate.to "http://localhost:3000/" | |
puts driver.title | |
driver.quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment