When displaying a screenshot of Selenium with Jupyter, I think it is common to write driver.save_screenshot ('screenshot.png')
, but if you are using Jupyter, you will want to display it as it is.
I did not find it unexpectedly when I looked it up, so I will introduce it.
from IPython.display import Image
Image(driver.get_screenshot_as_png())
Recommended Posts