instantiate capybara browser and set a proxy

十年热恋 提交于 2019-12-02 12:36:50

问题


Following this documentation I'm trying to instantiate a capybara browser and set a proxy

b = Capybara::Driver::Webkit::Browser.new
b.set_proxy :host => 'localhost', :port => 8888

Unfortunately the documentation is out of date and I can't find the new right way to do it. I get:

NameError: uninitialized constant Capybara::Driver::Webkit::Browser

回答1:


page.driver.browser.set_proxy :host => 'localhost', :port => 8888


来源:https://stackoverflow.com/questions/13339993/instantiate-capybara-browser-and-set-a-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!