Zarkonnen / se-interpreter

Interpreter for Selenium Builder JSON scripts based on node.js and wd.
34 stars 31 forks source link

Cannot use a proxy #4

Closed babar-igor closed 10 years ago

babar-igor commented 10 years ago

There is not a possibility to use a proxy server in the tests.

Zarkonnen commented 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?

Zarkonnen commented 10 years ago

Come to think of it, you should be able to just use a config JSON file.

babar-igor commented 10 years ago

I would be grateful if you give an example ) Thanks.

Zarkonnen commented 10 years ago

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.

brownman commented 7 years ago

quick workaround: