selenium截图

 

谷歌驱动自带了截图驱动

get_screenshot_as_file()
具体使用方法
wd.get_screenshot_as_file('C:\\Users\\EDZ\PycharmProjects\\first_test\\venv\\img\\test.png')

就这样就可以简单的获取截图,对于最后的pass检查有很大用处

posted @ 2021-08-23 18:01  小破的博客  阅读(47)  评论(0编辑  收藏  举报