我是 QTP 的新手,我遇到了错误验证消息"的问题.我有一个任务来检查输入无效输入时是否出现错误验证消息.我尝试在输入数据之前和之后检查,但不幸的是QTP识别了错误消息"并且看到甚至页面上没有显示错误.
I am new to QTP and I have a problem with "error validation message". I have a task that checks whether the error validation message appears when invalid input is entered. I tried to check before and after the data is entered, but unfortunately the QTP recognies the "error message" and see is even that the error is not displayed on the page.
我可以处理这个问题吗?
can I handle this issue ?
推荐答案即使您看不到错误消息,也可能存在错误消息,尤其是在 Web 应用程序中,元素通常存在但在需要之前不可见.
The error message may exist even if you can't see it, especially in web applications an element is often there but invisible until it's needed.
可以检查错误信息对象是否可见,对象不可见的常见方式有3种
You can check if the error message object is visible, there are three common ways in which an object can be invisible
- 它有一个属性将其标记为不可见(例如在 Web visible=false 中)
- 它的宽度或高度为零
- 它位于屏幕外(通常处于负面位置)
- 请注意,对于多个显示器,负位置可能仍然可见.
了解如何区分可见的错误消息和不可见的错误消息,并相应地编写测试.
Find out how to distinguish a visible error message from an invisible one and write your test accordingly.
更多推荐
QTP如何处理对象的存在?
发布评论