如何在UI自动化中选择Excel Range. [英] How to select Excel Range in UI Automation.

查看:153
本文介绍了如何在UI自动化中选择Excel Range.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的项目中有需要针对以下情况进行自动化测试的要求,

We have requirement in our project where we need to do automation testing for the below scenarios,

1.启动Excel

1. Lanch Excel

2.单击Excel加载项(安装我们的excel加载项VSTO后,会显示为选项卡)

2. Click on Excel Add-in(Which comes up as tab after installing our excel Add-In VSTO)

3.打开一些excel数据并选择某个范围(例如:Sheet1:A1至F6).

3. Open some excel Data and Select some range (Ex : Sheet1 : A1 to F6) .

4.选择范围,然后右键单击某个按钮.

4. Select range and right click on some button.

 

我们还需要验证是否选择了范围.

We also need to validate whether range is selected or not.

使用UI自动化是否可以实现.这是非常迫切的要求.

Is this is possible using UI Automation.Its very urgent requirement.

任何帮助或示例代码都会有很大帮助.

Any help or sample code would great help.

 

谢谢

香卡.

 

 

推荐答案

尚卡尔,

Excel不支持UI自动化,因此您无法使用UI Automation.

Excel does not support UI Automation, so you cannot do this with UI Automation.

但是,Excel对象模型确实支持您所做的描述.

However, the Excel Object Model does support doing what you describe.

http://msdn.microsoft.com/en-us/library/wss56bz7(VS.80).aspx

我认为您可以使用Excel OM完成所有这些任务.

I think you can complete all of those tasks using the Excel OM.

谢谢,
迈克尔

Thanks,
Michael


这篇关于如何在UI自动化中选择Excel Range.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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