Web链接测试如何做? 您所在的位置:网站首页 web应用功能测试怎么做 Web链接测试如何做?

Web链接测试如何做?

2023-12-15 05:15| 来源: 网络整理| 查看: 265

WindowsGUI自动化测试框架搭建(四)-第一个WindowsGUI自动化测试程序

虫无涯: 第一个问题:这个是pycharm的机制,改完后需要重启; 第二个问题:意思是找不到:Name:文本编辑器[code=python] {Name: '文本编辑器', ControlType: EditControl} [/code] 原因可能是操作系统不一样,因为w7,8,10的记事本窗体可编辑窗体名称和w11是不一样的。 其他详细问题,请私我,评论区看起来有点不太方便呢

WindowsGUI自动化测试框架搭建(四)-第一个WindowsGUI自动化测试程序

cybertron1217: self = maxSearchSeconds = 10, searchIntervalSeconds = 0.5, raiseException = True def Refind(self, maxSearchSeconds: float = TIME_OUT_SECOND, searchIntervalSeconds: float = SEARCH_INTERVAL, raiseException: bool = True) -> bool: """ Refind the control every searchIntervalSeconds seconds in maxSearchSeconds seconds. maxSearchSeconds: float. searchIntervalSeconds: float. raiseException: bool, if True, raise a LookupError if timeout. Return bool, True if find. """ if not self.Exists(maxSearchSeconds, searchIntervalSeconds, False if raiseException else DEBUG_EXIST_DISAPPEAR): if raiseException: Logger.ColorfullyLog('Find Control Timeout({}s): {}'.format(maxSearchSeconds, self.GetColorfulSearchPropertiesStr())) > raise LookupError('Find Control Timeout({}s): {}'.format(maxSearchSeconds, self.GetSe

WindowsGUI自动化测试框架搭建(四)-第一个WindowsGUI自动化测试程序

cybertron1217: 感谢回复,两个问题问您: 1. 我在pycharm的选择的default test runner是unittest,为什么会默认用Pytest执行? 2.FAILED [ 50%]=============== ControlType: WindowControl ClassName: Notepad AutomationId: Rect: (648,48,1848,662)[1200x614] Name: '无标题 - 记事本' Handle: 0x120556(1181014) 2023-12-11 11:24:26.092 test_notepad.py[72] test_notepad -> Find Control Timeout(10s): {Name: '文本编辑器', ControlType: EditControl}

WindowsGUI自动化测试框架搭建(四)-第一个WindowsGUI自动化测试程序

虫无涯: 看最后的提示应该是第一个控件没找到。这样,你用unittest框架运行用例,会给出详细的错误步骤。目前你的用的pytest框架运行的,看不到详细的错误信息

WindowsGUI自动化测试框架搭建(四)-第一个WindowsGUI自动化测试程序

cybertron1217: D:\python\python.exe "D:/Pycharm/PyCharm Community Edition 2023.2.1/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py" --target test_notepad.py::TestNotePad Testing started at 10:30 ... Launching pytest with arguments test_notepad.py::TestNotePad --no-header --no-summary -q in D:\Automated-GuiTest-Demo ============================= test session starts ============================= collecting ... collected 2 items test_notepad.py::TestNotePad::test_notepad test_notepad.py::TestNotePad::test_notepad ERROR [ 50%] test_notepad.py::TestNotePad::test_notepad_text test_notepad.py::TestNotePad::test_notepad_text ERROR [100%] =================== 2 failed, 2 errors in 65.85s (0:01:05) ==================== Windows fatal exception: code 0x80040155 Current thread 0x00000b54 (most recent call first): File "D:\python\lib\site-packages\uiautomation\uiautomation.py", line 6291 in GetFirstChildControl 请问我复制的代码运行时报了很多错误,该如何解决?



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有