Answer the question
In order to leave comments, you need to log in
selenium. How to set up a proxy or VPN in any browser?
Good day!!! I need to write a test using Selenium. The main problem is the proxy. At first conceived under Chrome. Google has a bunch of ways to set up a proxy for chrome. AND NONE WORK!!! Then I remembered the built-in VPN in Opera. Nothing works either. Now I'm considering an option for any browsers. Can someone give me some advice? Half a day of googling gave me nothing, my only salvation was a toaster. Help someone is not difficult.
Answer the question
In order to leave comments, you need to log in
https://stackoverflow.com/questions/11450158/how-d...
?
Well, in general, in selenium itself it is installed like this:
https://www.seleniumhq.org/docs/04_webdriver_advan...
when setting up a VPN (well, there are all sorts of them), usually all traffic from your machine goes through VPN.
then you just use Webdriver whichever browser from Selenium is needed.
do not consider it for advertising, I used it for my needs., all the rules.
https://protonvpn.com/
the client set up in a couple of clicks. all traffic goes through VPN, just launch browsers and work.
operating system Ubuntu 16
This is how it is written in Powershell, and in Python everything is the same:
add-type -path "C:\Program Files\WindowsPowerShell\Modules\Selenium\1.1\assemblies\WebDriver.dll"
$options = New-Object OpenQA.Selenium.Chrome .ChromeOptions
$options.addArguments("proxy-server= 5.196.132.124:3128 ")
$driver = New-Object OpenQA.Selenium.Chrome.ChromeDriver($options)
$Driver.Navigate().GoToUrl(" https:// 2ip.ru/ ")
Checked it works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question