Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDriver Proxy setting does not work #2309

Closed
loyalchow opened this issue Jun 17, 2016 · 0 comments
Closed

WebDriver Proxy setting does not work #2309

loyalchow opened this issue Jun 17, 2016 · 0 comments
Labels

Comments

@loyalchow
Copy link

Meta -

OS: Mac OS X 10.11.5
Selenium Version: 2.53.2

Expected Behavior -

Expect selenium-webdriver to connect to a remote Selenium server through a proxy when using usingWebDriverProxy.

Actual Behavior -

selenium-webdriver does not proxy requests correctly to remote Selenium server, even when usingWebDriverProxy option is set correctly. Instead, it sends webdriver requests directly to the proxy server.

Steps to reproduce -

  1. On Mac, install and run SquidMan proxy server on port 8080 (default settings)
  2. Run the code below using NodeJS, which attempts to connect to a remote Selenium server.
  3. When run, will output an error. Should instead get "successful connection using proxy" message.
var webdriver = require('selenium-webdriver');
new webdriver.Builder()
    .forBrowser('chrome')
    .usingWebDriverProxy('http://localhost:8080')
    .usingServer('http://ondemand.saucelabs.com/wd/hub')
    .buildAsync()
    .then(function(driver) {
        driver.quit();
    })
    .catch(function(ex) {
        var err = ex.stack.toString();
        if (err.indexOf('Sauce Labs Authentication Error') > -1) {
            return console.log('Successful connection using proxy!')
        }
        console.error(err);
    });
@jleyba jleyba closed this as completed in 36a417e Jun 21, 2016
@lock lock bot locked and limited conversation to collaborators Aug 20, 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

2 participants