小编use*_*993的帖子

在selenium webdriver中使用带有phantomjs的代理

我正在尝试使用PhantomJS 1.9.1在selenium webdriver(2.25)的ruby(1.8.7)脚本中配置代理.

我在Firefox上看到了一些例子,我用这个浏览器成功地完成了它.我用过这段代码:

profile = Selenium::WebDriver::Firefox::Profile.new
    profile.proxy = Selenium::WebDriver::Proxy.new :ssl => 'chronos.landebitel.local:3128'
    $browser = Watir::Browser.new :firefox, :profile => profile
Run Code Online (Sandbox Code Playgroud)

但我找不到任何phantomjs的例子.我搜索并尝试了许多解决方案,但都没有效果.

有人可以举个例子来帮助我吗?

ruby proxy selenium phantomjs

3
推荐指数
2
解决办法
3913
查看次数

标签 统计

phantomjs ×1

proxy ×1

ruby ×1

selenium ×1