How to take a full-screen screenshot of python selenium (with the taskbar below)

all I know now is:

driver.get_screenshot_as_file(ImgPath)  

the default is the so-called full screen screenshot, but it only captures the content of the web page, not the taskbar below or the tab above. Because the screenshot I need must be based on the date and time below the taskbar, I must at least take a screenshot of the taskbar with the content.

so I would like to ask if there is any way to take a real full-screen screenshot. Thank you!

Mar.17,2021

as far as I know, selenium cannot capture screens other than web pages (in browsers).

to intercept the time of the windows system taskbar or the lower right corner, you need to call the system API. The easiest way is to use a screenshot library, such as https://github.com/ponty/pysc..

Menu