QTP:与标题无关的唯一浏览器标识符?

发布于 2024-11-14 10:54:29 字数 156 浏览 6 评论 0原文

在我的 QTP 关键字驱动的自动化中,我想打开浏览器,然后自动调用该浏览器上的所有功能。我注意到即使浏览器标题发生变化它也能工作,但我不确定这是否是巧合。 我需要使用 ID 打开浏览器,然后简单地调用 Browser("MyID")。功能。即使浏览器更改名称,有什么方法或者我可以依赖 QTP 吗?

In my QTP keywrord driven automation, I would like to open browser and then automatically call all functions on that browser. I noticed it does work even when the browser title changes but I am not sure whether its coincidence or not.
I would need to open browser with e.g. ID and then simply call Browser("MyID"). functions. Is there any way or I can rely on QTP even when the browser changes its name?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

小草泠泠 2024-11-21 10:54:29

QTP 不使用标题来标识浏览器,描述通常基于浏览器的创建时间(请参阅创建时间序号标识符)。所以如果你的机器状态相同(开始测试之前没有打开其他浏览器)那么标识应该是一致的。

QTP doesn't use the title to identify the browser, the description usually is based on when the browser was created (see the Creation Time ordinal identifier). So if the state of your machine is the same (no other browsers were open before beginning to test) then the identification should be consistent.

ゃ人海孤独症 2024-11-21 10:54:29

在测试过程中,如果始终只打开一个浏览器窗口,那么
只需在 OR 中添加一个“浏览器”对象,无需任何标识属性即可。

如果打开了多个浏览器,那么您可能需要添加一个或多个
姓名
标题
创作时间。

但请避免使用创建时间。

During your testing, if there's only one Browser window open all the time , then
Just adding a "Browser" object in your OR , without any identification property would work.

If there are multiple browsers open, then you might have to add one or more of
Name
Title
Creation time.

Avoid using Creation time though.

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