Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conftest 中的截图功能 有问题,单独运行时报错“AttributeError: 'NoneType' object has no attribute 'save_screenshot'” #8

Open
liutan102 opened this issue May 30, 2020 · 4 comments

Comments

@liutan102
Copy link

conftest 中的截图功能 有问题,run_test运行时候没有错但是image中没有图片;单独运行 conftest 时报错“AttributeError: 'NoneType' object has no attribute 'save_screenshot'”

@Juan-Chen-BNUZ
Copy link

new_report_time() 方法中路径错误,return files[-1],当存在日志的时候,倒数第一个文件是__init__.py,所以save_screenshot方法中的路径就会错误,应该改成 return files[-2]

@karllao
Copy link

karllao commented Feb 19, 2021

@liutan102 有解决了吗

@karllao
Copy link

karllao commented Feb 19, 2021

@Juan-Chen-BNUZ 没理解你的意思

@lonelyplant
Copy link

我遇到了同样的报错,我发现可能是因为浏览器驱动没有下载成功,注释掉下载浏览器驱动的一行代码后,添加一行 driver = webdriver.Chrome(),手动配置浏览器驱动后再次运行已经正常

微信截图_20231012211139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants