본문 바로가기

Python

[Error] Selenium 작업 중 에러가 있을 때 확인 방법 (google colab)

from IPython.display import Image, display
import os

error_screenshot_path = os.path.join(download_dir, "error_screenshot.png")
if os.path.exists(error_screenshot_path):
    print(f"Displaying error screenshot from: {error_screenshot_path}")
    display(Image(filename=error_screenshot_path))
else:
    print("Error screenshot not found.")