Immagine di Python contenente chrome
50K+
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()
Content type
Image
Digest
Size
326.4 MB
Last updated
over 4 years ago
docker pull brumbrum/python3-chrome