在 QTP 中参数化链接元素
如何在QTP中参数化链接元素?
我的申请中有一个订单号。我点击该号码以查找其详细信息。 QTP 将其保存为链接。现在我想查看另一个订单的详细信息。我已经参数化了订单号。现在 QTP 从数据表中选择新的数字。但由于保存的链接是针对前一个订单的,因此打开的订单不是新订单。
How to parametrize link elements in QTP?
I have an order number in my application. I click on that number to find its detail. QTP save this as a link. Now I want to see detail of another order. I have parametrize the order number. Now QTP pick new number from datasheet. But as the link saved is for the previous order so that order is getting opened not the new one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果使用描述性编程,则通过变量参数化对象描述。
示例:
如果通过存储库使用映射,请将属性值直接参数化到数据表。您可以在 QTP 帮助中找到带有屏幕截图的非常好的解释。
If you use descriptive programming, parameterize object description through variable.
Example:
If you use mapping through repository, parameterize property value directly to datatable. You can find a very good explanation with screenshots in QTP help.
为此使用描述性内容。首先检查该链接每次更改的属性(名称、显示名称等)。然后使用该属性名称,如下所示:
index
用于唯一标识。Use descriptive for this. First check the property of that link changing every time with order number (name, display name etc.). Then use that property name like below:
The
index
is for unique identification.您可以使用描述性编程进行参数化,也可以从对象存储库进行参数化,但我不建议这样做。您可以转到对象存储库,单击对象存储库中的该按钮,您可以在测试对象详细信息附近找到+号,单击该按钮并添加描述属性“Outerhtml”并参数化或使用正则表达式。您还可以从对象存储库进行参数化。然而,将对象添加到对象存储库只会使事情变慢。描述性编程更好。
You can parameterize with descriptive programming or you can also parameterize from Object repository which I would not suggest. You can go to object repository Click on that button in object repository there you can find + sign near by test object details click on that and add description properties "Outerhtml" and parameterize or use regular expression . You can also parameterize from Object repository. However, adding objects to object repository would only make things slow. Descriptive programming is better.