是否可以通过编码UI获取iframe及其属性(iframe中的HTML字段) [英] Is it possible to get IFrame and its attriutes (HTML fields inside the iFrame) through Coded UI

查看:96
本文介绍了是否可以通过编码UI获取iframe及其属性(iframe中的HTML字段)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Web应用程序需要进行自动化测试.通过编码UI,我试图使整个应用程序自动化.

We have a web application needs to be automate for testing. Through Coded UI, I am trying to automate the whole application.

我需要访问IFrame内部实际存在的按钮/图片/Div标签.我可以浏览并获取网页中的所有HTML控件(iframe除外).当我尝试通过ID搜索IFrame时,没有得到它.

甚至我也尝试记录有关该IFrame的操作,但是通过编码UI却没有发现任何问题.

I need to access buttons / Images / Div tags which are actually exists inside the IFrame. I can able to browse and get all the HTML controls (except IFrame) in the web page. When I am trying to search the IFrame by its ID, I am not getting it.

Even I tried to Record our action over that IFrame but nothing was caught through Coded UI.

以下配置用于此FYR,

Below configurations are used for this purpose FYR,

VS:VS 2012
浏览器:IE 10,Chrome Ver 38,Firefox 33

VS : VS 2012
Browsers : IE 10, Chrome Ver 38, Firefox 33

有人可以帮我吗!

在此先感谢!

Can anyone please help me on this!

Thanks in advance!!

推荐答案

您好Mathumathi_R,

Hi Mathumathi_R,

可以通过编码的UI测试在其中获取iframe和html字段.

It is possible to get IFrame and html fields inside it in Coded UI test.

通过我的测试结果,当我在iframe上拖动十字准线时,编码UI测试生成器无法直接识别iframe控件,但是它可以直接识别和捕获iframe中的控件.在iframe中记录针对控件的操作后 并生成代码,我检查了生成的代码,发现已记录了iframe控件.

Through my test result, Coded UI Test Builder does not recognize the iframe control directly when I drag the crosshair on the iframe, but it can recognize and capture controls within the iframe directly. After I recorded actions against controls in an iframe and generate code, I checked the generated code and found that the iframe control was recorded.

请拖动十字准线并在iframe内的控件上记录操作,而不是捕获iframe控件本身.

Please drag the crosshair and record actions on the controls within an iframe instead of capturing the iframe control itself.

请注意,Chrome和Firefox浏览器不支持录制操作.请在IE浏览器中记录操作.

Note that Chrome and Firefox browser does not support recording actions. Please record actions in IE browser.


这篇关于是否可以通过编码UI获取iframe及其属性(iframe中的HTML字段)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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