我运行了Selenium代码,如果测试失败,我想从头到尾看到整个过程(不使用屏幕截图),知道如何在运行selenium时记录屏幕。
from selenium import webdriver
driver = webdriver.Chrome()
# If test is fail i want to save video file who recorded the whole process
def test1():
driver.get(...)
e = driver.find_element(...)
e.click()
assert e.text == 'Some Text'
THX。