Selenium2 learning: window screenshots

1.1 Window screenshot

Webdriver provides the screenshot function get_screenshot_as_file (local path and image name) to capture the current creation window. E.g:

# Capture the current window and specify the save location of the screenshot image

driver.get_screenshot_as_file(r"C:\Users\fyr\Desktop\123.jpg")

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325288866&siteId=291194637