Untitled
user_4941717
python
a year ago
838 B
29
Indexable
from tkinter import Radiobutton
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
def iniciar_driver():
chrome_options = Options()
arguments = ['--lang=pt-BR', '--window-size=800,600', '--incognito']
for argument in arguments:
chrome_options.add_argument(argument)
chrome_options.add_experimental_option('prefs', {
'download.prompt_for_download': False,
'profile.default_content_setting_values.notifications': 2,
'profile.default_content_setting_values.automatic_downloads': 1,
})
driver = webdriver.Chrome(options=chrome_options)
return driverEditor is loading...
Leave a Comment