在 QTP 中参数化链接元素

发布于 2024-09-12 11:05:00 字数 149 浏览 4 评论 0原文

如何在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡淡の花香 2024-09-19 11:05:01

如果使用描述性编程,则通过变量参数化对象描述。

示例:

 [...].Link("name:=order" & intOrderNumber)

如果通过存储库使用映射,请将属性值直接参数化到数据表。您可以在 QTP 帮助中找到带有屏幕截图的非常好的解释。

If you use descriptive programming, parameterize object description through variable.

Example:

 [...].Link("name:=order" & intOrderNumber)

If you use mapping through repository, parameterize property value directly to datatable. You can find a very good explanation with screenshots in QTP help.

霓裳挽歌倾城醉 2024-09-19 11:05:01

为此使用描述性内容。首先检查该链接每次更改的属性(名称、显示名称等)。然后使用该属性名称,如下所示:

B(...).p(...).link("propertyname:="&ordernumber,"index:=0")

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:

B(...).p(...).link("propertyname:="&ordernumber,"index:=0")

The index is for unique identification.

不喜欢何必死缠烂打 2024-09-19 11:05:01

您可以使用描述性编程进行参数化,也可以从对象存储库进行参数化,但我不建议这样做。您可以转到对象存储库,单击对象存储库中的该按钮,您可以在测试对象详细信息附近找到+号,单击该按钮并添加描述属性“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文