Python - Selenium - How to use Browser Shortcuts
问题 Once a browser page is loaded I'm looking to use the CRTL+P shortcut in Goggle Chrome to enter the print page and then simply press return to print the page. import time from selenium import webdriver # Initialise the webdriver chromeOps=webdriver.ChromeOptions() chromeOps._binary_location = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" chromeOps._arguments = ["--enable-internal-flash"] browser = webdriver.Chrome("C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe