Pastebin

Paste #23623: No description

< previous paste - next paste>

Pasted by Anonymous Coward

Download View as text


def browser():
    options = Options()
    chrome_binary_path = r"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
    driver_path = r"driver\chromedriver.exe"
    options.binary_location = chrome_binary_path
    options.binary = chrome_binary_path
    b = webdriver.Chrome(service=Service(driver_path), options=options)
    b.implicitly_wait(10)
    yield b
    # quit the driver instance for cleanup
    b.quit()

driver = browser()

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.