Last active
May 24, 2018 12:06
-
-
Save dahngeek/752ca52778913705f7204c57f359afb5 to your computer and use it in GitHub Desktop.
Running a PhantomJS driver with webdriver.io using an http proxy. Or with authentication.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
capabilities: [ | |
{ browserName: 'phantomjs', | |
"phantomjs.page.settings.userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.1.54 (KHTML, like Gecko) Version/9.0 Safari/601.1.54", | |
"proxy": { | |
"proxyType":"MANUAL", | |
"httpProxy":"HOST:PORT" | |
} | |
} | |
] | |
// OTHER OPTIONS WOULD BE: | |
// , httpProxy: 'domain.com:port' | |
// , sslProxy: 'domain.com:port' | |
// , socksUsername: 'username' | |
// , socksPassword: '**************' | |
//OTHER METHOD with AUTH | |
{ browserName: 'phantomjs', | |
"phantomjs.page.settings.userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.1.54 (KHTML, like Gecko) Version/9.0 Safari/601.1.54", | |
"phantomjs.cli.args": [ | |
"--proxy-type=http", | |
"--proxy=HOST:PORT", | |
"--proxy-auth=username:password" | |
] | |
} | |
//Comment if it was useful! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment