- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试开发一个通用的注册函数来验证给定对象的存在,然后在报告中添加一行以说明它是否被找到。
这是函数:
'@Description Reports in the test results whether the given object exists.
Public Function verifyExistence(ByRef test_object)
If test_object.Exist(1) Then
Reporter.ReportEvent micPass, "Verify that the page exists.", "Page exists."
Else
Reporter.ReportEvent micFail, "Verify that the page exists.", "Page does not exist."
End If
End Function
RegisterUserFunc "Page", "verifyExistence", "verifyExistence"
typename = getType(test_object)
if typeName = "Page" Then
objName = test_object.GetROProperty("title")
... 'and so on.
end if
最佳答案
尝试使用 test_object.GetTOProperty("micclass")
用于测试对象的名称。
一些动态对象(例如从 ChildObjects
返回的那些)可能没有在 QTP 端设置这个属性,在这种情况下你应该做 test_object.GetROProperty("micclass")
.
RO 方法应该总是有效,但它比 慢一点至 应该几乎总是有效的方法。
关于vbscript - 获取QTP中调用注册函数的对象类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16047008/
我用 html 创建了一个简单的表单,它有两个对象(编辑框 - 名字),它们具有相同的属性(如名称、输入和其他),一个在另一个下面。我在其中一个编辑框中记录了一个操作,对象被添加到本地对象存储库中,索
我正在使用Web可扩展性工具包实现对QTP的扩展。 如果我实现QTP操作的JScript函数遇到错误(例如,用户输入了错误的参数值),我希望QTP停止测试执行并通知用户该错误。我希望它充当QTP中的正
我正在寻找使用 QTP 触发弹出式菜单操作的想法。 我正在使用 QTP 测试 Web 应用程序。该应用程序具有“级联”或分层弹出菜单。 例如选项->首选项 在重新编码时,QTP 会识别菜单层次结构的终
我正在尝试使用 QTP 识别框架内显示的内容。我从页面询问所有符合描述的框架并获得框架集合。我从集合中取出第一帧,但由于某种原因,该对象似乎不存在,因此我无法访问内部显示的内容。知道如何提取框架内的内
有人能告诉我我们如何在 QTP 中定义一个变量,该变量将在运行时在一个操作中存储信息,然后该变量将在同一测试的其他操作中使用。 最佳答案 全局范围变量的两个最快选项(尽管还有其他传递数据的方法): 环
我们有一个应用程序,其中正在加载一些文件,并且应用程序在加载文件期间停止响应一段时间。在测试自动化期间,我们有文件加载是自动的场景,但 qtp 必须等到应用程序再次开始响应。如何编码?有没有像“Wai
在给定的测试文件夹中,有以下结构: Action 0 ->快照 ->-> 很多 *.pngs、*.htmls 等。 . . . Action N 快照有什么用?从我在 http://www.geeki
我有一个 ftp 批处理文件,如下所示: open bin cd \Curr_QA_DataLoad put C:\Users\niprakash\Documents\XYZ\7090\Niti
我有以下 HTML 标记,QTP 将其正确识别为 WebEdit 对象: 如何将 HTML 标记中的 _id 属性获取到 QTP 中的对象属性中?我使用“对象标识”对话框将 _id 和 html _
我有以下 HTML 标记,QTP 将其正确识别为 WebEdit 对象: 如何将 HTML 标记中的 _id 属性获取到 QTP 中的对象属性中?我使用“对象标识”对话框将 _id 和 html _
我正在尝试使用 QTP 11.0 Web 可扩展性插件让自定义 Web 元素类型显示在“对象标识”下。 如问题末尾所示,我的扩展程序中有四个文件。我的问题是没有任何对象显示在 Object Ident
我们计划在 Windows 10 上测试我们的应用程序。我们得到了 UFT 12 和 QTP 11,想知道它是否支持 Windows 10。 我试图在谷歌上搜索但没有得到明确的答案。 最佳答案 它支持
有没有人有构建 .NET 测试执行工具的经验,该工具可以执行现有 QuickTest Professional VBScript 自动化脚本中的逻辑,但无需启动 QTP 实例?我们正在过渡到 Visu
在这篇文章中描述了 how to improve QTP’s debug engine QTP 10 和 QTP 11 有什么可能吗? 谢谢! 最佳答案 根据 http://depenga.com/Q
QTP中的等待和同步功能之间有什么区别?另外,请给出一个想法,可以使用什么情况等待功能,以及可以使用情况同步功能。 请帮帮我。 最佳答案 Browser.Sync或Page.Sync等待导航完成,这意
我有一个场景,浏览器状态 =done 但仍未加载页面。 qtp 是否有可以等到页面完全加载的通用程序? 我尝试使用 objBrowzer.sync,objPage.Sync,objPage.waitp
例如,假设一个测试调用了两个动作 A 和 B。 A 通过调用 "Reporter.ReportEvent micFail, ... 执行“失败”的步骤",B 通过调用 "Reporter.Repo
在 QTP 中,有一个存储对象的对象存储库。并且这些对象可以重复使用。重用在这里是什么意思?该对象是否保存在内存中?....对象存储库只是一个 xml 文件,用于存储对象的属性,对吗? 最佳答案 对象
我必须右键单击网络元素。我尝试了以下方法: 为简化代码,假设 webElem 引用有效的 Browser().Page().WebElement()。 1) Set obj=createobject(
我想在发生错误时截取应用程序的屏幕截图并将其保存在特定文件夹中。下面的代码可以工作,但它不会截取应用程序的屏幕截图,而是截取 QTP 代码屏幕的屏幕截图。 Function CaptureImage(
我是一名优秀的程序员,十分优秀!