Question

Is it possible to change a Watir Browser object's server port?

I'm looking for something in Watir or Watir-webdriver (or Selenium-webdriver, even) akin to what you get with Capybara.server_port (when you're using Capybara, obviously)?

Was it helpful?

Solution

If I'm not mistaken then should be like

require "selenium-webdriver"

profile = Selenium::WebDriver::Firefox::Profile.new
profile['network.proxy.http'] = 'localhost'
profile['port']=9095

driver = Selenium::WebDriver.for :firefox, :profile => profile
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top