feat: 添加测试方法以验证DailymotionClient功能并记录截图
This commit is contained in:
parent
85fce7eadd
commit
bb9830887a
@ -319,8 +319,22 @@ class DailymotionClient:
|
|||||||
# 处理 Solved 状态
|
# 处理 Solved 状态
|
||||||
return 2,""
|
return 2,""
|
||||||
|
|
||||||
|
@require_login
|
||||||
|
def test(self):
|
||||||
|
logger.info(f"Testing DailymotionClient with email: {self.email}")
|
||||||
|
self.page.goto(self.url, timeout=30000)
|
||||||
|
file_path = f'screenshots/{str(int(time.time()))}_test.png'
|
||||||
|
self.page.screenshot(path=file_path)
|
||||||
|
self.page.wait_for_timeout(1000)
|
||||||
|
file_path = f"screenshots/{str(int(time.time()))}_test2.png"
|
||||||
|
self.page.screenshot(path=file_path)
|
||||||
|
logger.info(f"Test screenshot saved to {file_path}")
|
||||||
|
self.page.wait_for_timeout(1000)
|
||||||
|
file_path = f"screenshots/{str(int(time.time()))}_test3.png"
|
||||||
|
self.page.screenshot(path=file_path)
|
||||||
|
logger.info(f"Test screenshot saved to {file_path}")
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
try:
|
try:
|
||||||
self.page.close()
|
self.page.close()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user