purer
purer

Reputation: 477

Selenium with custom proxy

I want to start chrome with my custom proxy/port. I start selenium like this:

java -Dwebdriver.chrome.driver="node_modules/webdriver-manager/selenium/chromedriver" -jar node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar -port 5555 > log.txt &

And i am setting proxy/port with theese arguments:

 -Dhttp.proxyHost=http://xx.xxx.xx.xxx -Dhttp.proxyPort=8080

But it doesnt seems to work.

Also i tryied:

"capabilities":
{
    "browserName": 'chrome',
    //"chromeOptions": {"binary": "/opt/bamboo1/bamboo-agent-home/xml-data/build-dir/PP-AT-TES/opt/google/chrome/chrome"}
    //"chromeOptions": {"binary": "/opt/google/chrome/chrome"}

    'proxy':{
        'proxyType': 'MANUAL',
        'httpProxy': 'http://xx.xxx.xx.xxx:8080',
        'sslProxy': 'http://xx.xxx.xx.xxx:8080'
    }
}

Upvotes: 0

Views: 621

Answers (1)

purer
purer

Reputation: 477

This does work. Problem was in my server.

"capabilities":
{
    "browserName": 'chrome',
    //"chromeOptions": {"binary": "/opt/bamboo1/bamboo-agent-home/xml-data/build-dir/PP-AT-TES/opt/google/chrome/chrome"}
    //"chromeOptions": {"binary": "/opt/google/chrome/chrome"}

    'proxy':{
        'proxyType': 'MANUAL',
        'httpProxy': 'http://10.165.42.170:80',
        'sslProxy': 'http://10.165.42.170:80',
        'noProxy': 'url.sk,url2.sk'
    }
}

Upvotes: 1

Related Questions