QTP如何处理对象的存在?

编程入门 行业动态 更新时间:2024-10-23 18:21:59
本文介绍了QTP如何处理对象的存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是 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如何处理对象的存在?

本文发布于:2023-11-08 11:26:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569241.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何处理   对象   QTP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!