operasoftware / operachromiumdriver

OperaDriver for Chromium-based Opera releases
Other
261 stars 47 forks source link

Feature Request: Toggle VPN via DesiredCapabilities #23

Open hazmeister opened 8 years ago

hazmeister commented 8 years ago

Saw the announcement today - Opera now supports VPN built into the browser!

We have an app which offers different options based on the user's IP address. It would awesome if we could test our different regions by toggling the VPN when starting the browser, perhaps via DesiredCapabilities. This really takes the pain out of managing VPN connections for an environment. Ideally, this would enable us to choose a location too.

Deadly0 commented 7 years ago

Hi @hazmeister did you found a way how to toggle VPN in Opera?

hazmeister commented 7 years ago

There may be an easier way - but I did manage to get it working using OperaOptions to load a custom profile:

OperaOptions operaOptions = new OperaOptions();
operaOptions.addArguments("user-data-dir", "~/Library/Application Support/com.operasoftware.Opera");
driver = new OperaDriver(operaOptions);