How can I take a screenshot with Selenium WebDriver?

后端 未结 30 2626
不知归路
不知归路 2020-11-21 07:48

Is it possible to take a screenshot using Selenium WebDriver?

(Note: Not Selenium Remote Control)

30条回答
  •  不知归路
    2020-11-21 08:33

    Python

    You can capture the image from windows using the Python web driver. Use the code below which page need to capture the screenshot.

    driver.save_screenshot('c:\foldername\filename.extension(png, jpeg)')
    

提交回复
热议问题