Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import time
- from selenium import webdriver
- from selenium.webdriver.chrome.options import Options
- from selenium.webdriver.chrome.service import Service
- from webdriver_manager.chrome import ChromeDriverManager
- driver_path = ChromeDriverManager().install()
- service = Service(executable_path=driver_path)
- chrome_options = Options()
- chrome_options.add_argument("user-data-dir=/home/a/.config/google-chrome")
- chrome_options.add_argument("--profile-directory=Default")
- chrome_options.add_argument("--disable-extensions")
- driver = webdriver.Chrome(service=service, options=chrome_options)
- driver.get('chrome://version')
- print(driver.title)
- time.sleep(5)
- driver.get('https://gmail.com')
- print(driver.title)
- time.sleep(300)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement