pyautoTest icon indicating copy to clipboard operation
pyautoTest copied to clipboard

Results 12 pyautoTest issues
Sort by recently updated
recently updated
newest added

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

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

import os import pytest from py.xml import html from selenium import webdriver from selenium.webdriver import Remote from selenium.webdriver.chrome.options import Options as CH_Options from selenium.webdriver.firefox.options import Options as FF_Options from config...

设置是个鼠标浮停的效果,这里会报错, 怎么解决这个问题? test_baidu.py def test_baidu_search_setting(self, browser, base_url): page.settings.click() class BaiduPage(Page): settings = PageElement(link_text="设置", describe="设置下拉框")

```python def test_LoginBySms_Success(self, browser, base_url): page = Login_Page(browser) print(page.login_success.text) ``` 在selenium 下无法获取元素的text E AttributeError: 'NoneType' object has no attribute 'text'

2020-01-15 11:35:56,042 - INFO - 回归模式,开始执行✈✈! ============================= test session starts ============================= platform win32 -- Python 3.7.1, pytest-4.3.0, py-1.8.1, pluggy-0.13.1 -- C:\Users\bima\AppData\Local\Programs\Python\Python37\python.exe cachedir: .pytest_cache metadata: {'Python': '3.7.1', 'Platform': 'Windows-8.1-6.3.9600-SP0', 'Packages': {'pytest':...

运行失败,提示“ModuleNotFoundError: No module named 'page'”,是什么原因呢 代码是和你的“test_baidu.py”一样的