2
5

More than 3 years have passed since last update.

JupyterでSeleniumのスクリーンショットをファイル保存せずに表示する

Posted at

JupyterでSeleniumのスクリーンショットを表示するときってdriver.save_screenshot('screenshot.png')と書くのが一般的だと思いますが、Jupyterを使っているとそのまま表示したくなりますよね。
調べても意外と出てこなかったので、紹介します。

やり方

from IPython.display import Image
Image(driver.get_screenshot_as_png())
2
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
5