Closed babar-igor closed 10 years ago
Looking at the code, I think the underlying issue is that it's not possible to pass in complex objects (such as proxy JSON objects) as browser options?
Come to think of it, you should be able to just use a config JSON file.
I would be grateful if you give an example ) Thanks.
Of course! The following config file will HTTP proxy through localhost:8085:
{
"type": "interpreter-config",
"configurations": [
{
"settings": [
{
"browserOptions": {
"browserName": "firefox",
"proxy": {
"proxyType": "manual",
"httpProxy": "localhost:8085"
}
}
}
],
"scripts": [
"examples/tests/get.json"
]
}
]
}
I've also added it to the examples and docs.
quick workaround:
//hardcoded editing:
var browserOptions = //{ 'browserName': 'chrome' };
{ browserName: 'chrome',
proxy:
{ proxyType: 'manual',
ftpProxy: undefined,
httpProxy: undefined,
sslProxy: '127.0.0.1:8081', //proxy host:port
noProxy: undefined } } ;
hpts --level=info -s 127.0.0.1:9050 -p 8081 #use http-to-socks converter for using with Tor proxy
There is not a possibility to use a proxy server in the tests.