无法获得编码的UI测试运行在IE 9与多个标签工作 [英] Can't get Coded UI test runs to work with multiple tabs in IE 9

查看:218
本文介绍了无法获得编码的UI测试运行在IE 9与多个标签工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用编码的UI-测试来测试我公司的网页已经和我碰到的这个问题最近几次,无法找出一个解决方案。我试图做的是有一个编码的UI测试请点击网站页面,然后打开一个新标签的链接中的链接。我的问题是断言,新的页面是正确的页面,并在它的正确的内容。

I've been using Coded UI-Tests to test my company's web pages and I've run into this problem several times lately, unable to figure out a solution. What I'm trying to do is have a coded UI test click a link on one of the sites pages, which then opens up the link in a new tab. My issue is asserting that the new page is the right page, and has the right content in it.

当我运行测试它会做一切正常,它打开在新标签页的链接,但测试似乎无法看到新的选项卡上什么。我记录在IE 9的环境测试,并通过编码的UI界面设置断言。有没有人知道的一种方式来测试注意力转向新标签?或者我遇到的问题可能是什么?

When I run the test it will do everything else fine, it opens the link in a new tab, but the test can't seem to see whats on the new tab. I recorded the tests in the IE 9 environment, and set the assertions through the Coded UI interface. Is anyone aware of a way to redirect the tests attention to the new tab? Or what the issue I'm experiencing could be?

任何帮助是极大的赞赏,感谢。

Any help is greatly appreciated, Thanks.

推荐答案

尝试寻找的HTMLDocument与父母设置为你的窗口:有几个选项卡,你应该找到几个的人(使用FindMatchingControls法)

Try finding HtmlDocument with parent set to your window: with several tabs you should find several ones (using FindMatchingControls method).

然后你马上就能看到他们的标题,并找出如何找到你所需要的标签。

Then you'll be able to see their captions and figure out how to find the tab you need.

在找到该选项卡,创建父设置为您找到的HTMLDocument HtmlControls

After you find the tab, create HtmlControls with parent set to the HtmlDocument you find.

请让我知道,如果它不能正常工作。

Please let me know if it doesn't work.

这篇关于无法获得编码的UI测试运行在IE 9与多个标签工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆