Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Ignore --proxy/--proxy-type when --webdriver #11619

Closed
a0s opened this issue Sep 12, 2013 · 9 comments
Closed

Ignore --proxy/--proxy-type when --webdriver #11619

a0s opened this issue Sep 12, 2013 · 9 comments
Labels

Comments

@a0s
Copy link

a0s commented Sep 12, 2013

Hi! Phantomjs 1.9.1 ignore cli proxy settings (--proxy and --proxy-type) when in --webdriver mode. Is it a bug?
I override this by using --config file.

@JamesMGreene
Copy link
Collaborator

Certainly sounds like a bug.

@simondean
Copy link

The proxy settings work when specified via Selenium's desiredCapabilities:

desiredCapabilities['proxy'] = {
  proxyType: 'manual',
  httpProxy: '10.0.0.1:8080', // Putting 'http://' on the front only works in PhantomJS 1.9.1 onward I think
  httpsProxy: '10.0.0.1:8080', // Putting 'http://' on the front only works in PhantomJS 1.9.1 onward I think
}

@a0s
Copy link
Author

a0s commented Oct 20, 2013

@simondean thanx for response! but its not working too

require 'watir-webdriver';
Selenium::WebDriver::PhantomJS.path = '/projects/phantomjs/bin/phantomjs'
client = Selenium::WebDriver::Remote::Http::Default.new;
client.timeout = 180;
capabilities = {'proxy' => {:proxyType => 'manual', :httpProxy => "#{ip}:8888", :httpsProxy => "#{ip}:8888"}}
driver = Selenium::WebDriver.for :phantomjs, :desired_capabilities => capabilities, :http_client => client
@agent = Watir::Browser.new driver
@agent.goto 'http://wtfismyip.com/text'
puts "proxy #{ip} -> result ip #{@agent.text}"

my proxy is working, but i got wrong result ip (first server's ip as result)

phantomjs -v => 1.9.2
watir-webdriver (0.6.4)
selenium-webdriver (2.35.1)

@oberlies
Copy link

Setting the proxy with the PhantomJS --proxy command line option was the only option that worked for me on Windows with 1.9.7. So I suppose that this bug is fixed.

@OndraM
Copy link

OndraM commented Jul 23, 2014

Does the proxy settings through webdriver's desired capabilites work for anyone? Other browser accept it just fine, but only phantomjs must have the proxy defined as the CLI option, otherwise it is not using the proxy at all.

@rdeknijf
Copy link

@OndraM I'm running into the same problem.

@ggnet
Copy link

ggnet commented Jan 8, 2015

@OndraM +1. I did not found any solution

@a0s
Copy link
Author

a0s commented Dec 29, 2016

After 3 years i found that '--config' trick works with http-proxy only, socks5 proxy not works in that way :(

@ghost ghost removed old.Component-Logic labels Dec 19, 2017
@stale stale bot added the stale label Dec 25, 2019
@stale
Copy link

stale bot commented Dec 28, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants