Pregunta

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)?

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top