![](https://img-blog.csdnimg.cn/20190927151053287.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
自动化测试 - web自动化
以web测试为背景,主要展示自动化技术
WenBeacon
这个作者很懒,什么都没留下…
展开
-
导入tomorrow,使用时报语法错误[SyntaxError: invalid syntax]
1.报错详情2.解决方案原因:async是python的关键字,修改函数名,如:async_th修改两处:第一处,函数定义位置第二处,函数被调用位置修改前,源代码修改后,代码原创 2021-06-21 17:54:38 · 229 阅读 · 0 评论 -
python输出测试报告时,报AttributeError: ‘_TestResult‘ object has no attribute ‘outputBuffer‘
1.报错信息:AttributeError: '_TestResult' object has no attribute 'outputBuffer'原创 2021-06-08 11:31:12 · 2234 阅读 · 0 评论 -
python读取Excel单元格数据时cell(rowx, colx)和cell_value(rowx, colx)的区别
一、源码分析:def cell(self, rowx, colx): """ :class:`Cell` object in the given row and column. """ if self.formatting_info: xfx = self.cell_xf_index(rowx, colx) else: xfx = None return Cell( self._cell_types[r.原创 2021-05-06 17:17:42 · 17794 阅读 · 1 评论 -
生成html格式的测试报告时,报【TypeError: a bytes-like object is required, not ‘str‘】
一,报错信息E:\pythonProject\study\venv\Scripts\python.exe E:/pythonProject/case/test_login.py...Traceback (most recent call last): File "E:\pythonProject\case\test_login.py", line 71, in <module> runner.run(suit) # 调用HTMLTestRunner类下面的run()方法运行用...原创 2021-04-28 15:43:52 · 1034 阅读 · 1 评论 -
使用HTMLTestRunner生成html格式的测试报告,中文乱码的解决方法
注意:文件格式一:查看html测试报告,如下图:二:部分源码filename = "E:/pythonProject/report/login_report.html" # 测试报告的存放路径及文件名fp = open(filename, "w") # 创建HTML格式的测试报告文件,此时还是个空文件,可用于写入文本runner = HTMLTestRunner.HTMLTestRunner(stream=fp,原创 2021-04-28 15:26:56 · 511 阅读 · 1 评论 -
生成自动化测试报告时报错,如何解决?
提问:AttributeError: 'str' object has no attribute 'write'1.问题描述:使用HTMLTestRunner方法生成html类型的测试报告时报错,如下图2.测试源码:# coding:utf-8import unittest, osfrom forTest import *from HTMLTestRunner import HTMLTestRunner# 会生成一个report.html格式的文件,在使用前进行路径的设置(保存原创 2020-11-17 17:22:48 · 420 阅读 · 2 评论 -
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
python报错:selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable1.经查不是chromdriver版本的问题1.经查不是chromedriver版本的问题2.代码没有问题,检查网络是否流畅3.网络慢,页面未加载完成,元素找不到4.解决方案,可以在访问url后面加几秒等待例如:driver = webdriver.Chrome()driver原创 2021-04-08 16:59:12 · 2226 阅读 · 0 评论