A
A
Akshin Yolchuev2020-03-25 08:54:43
Python
Akshin Yolchuev, 2020-03-25 08:54:43

How to prevent a new browser from opening in Selenium Python?

How to make the proxy change every time but the new browser does not open?

from selenium.webdriver.common.proxy import Proxy,ProxyType
from selenium import webdriver



prox = Proxy()
prox.proxy_type = ProxyType.MANUAL
prox.ssl_proxy = str()
prox.http_proxy = str()
capa = webdriver.DesiredCapabilities.OPERA

driver = webdriver.Opera(desired_capabilities=capa)
proxy = open('готовые работать прокси.txt','r')
aa = proxy.read().split('\n')
for i in aa:
    
    driver.get('https://www.showmyip.com')

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question