instantiate capybara browser and set a proxy

2019-07-25 00:16发布

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条回答
我只想做你的唯一
2楼-- · 2019-07-25 01:04
page.driver.browser.set_proxy :host => 'localhost', :port => 8888
查看更多
登录 后发表回答