Sign inSign up

brumbrum/python3-chrome

By brumbrum

Updated over 4 years ago

Immagine di Python contenente chrome

Image
1

50K+

brumbrum/python3-chrome repository overview

Immagine per python3 con ultima versione di chrome dentro

Esempio di uso:

import time
from selenium import webdriver


capabilities = webdriver.DesiredCapabilities.CHROME.copy()
capabilities['chromeOptions'] = {'args': ["--disable-gpu", "--headless", "--no-sandbox", "--user-data-dir=/user_data"]}
driver = webdriver.Chrome('/opt/chromedriver/chromedriver', desired_capabilities=capabilities)

driver.get('http://www.google.com/xhtml')
time.sleep(2) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(2) # Let the user actually see something!
driver.save_screenshot('scr.png')
driver.quit()

Tag summary

Content type

Image

Digest

Size

326.4 MB

Last updated

over 4 years ago

docker pull brumbrum/python3-chrome