code ui test中如何解决add assertion的函数参数总是取不到超过两层的值?(比如assert.equal中取不到值)
2010-10-09 14:47
302 查看
首先取到第一层的值,即表格的值,然后再通过自写代码来得到具体的值,比如一个表格的第7行第6列的值:
public void AssertMethod1()
{
WinTable uIDataGridViewTable = this.UIHRMClientVer2320910Window.UILaurelPark1Window.UIDataGridView1Window.UIDataGridViewTable;
WinRow row = uIDataGridViewTable.Rows[6] as WinRow;
WinCell cell = row.Cells[5] as WinCell;
string cellValue = cell.Value;
Assert.AreEqual(this.AssertMethod1ExpectedValues.UIDataGridViewTableName,cellValue);
}
public void AssertMethod1()
{
WinTable uIDataGridViewTable = this.UIHRMClientVer2320910Window.UILaurelPark1Window.UIDataGridView1Window.UIDataGridViewTable;
WinRow row = uIDataGridViewTable.Rows[6] as WinRow;
WinCell cell = row.Cells[5] as WinCell;
string cellValue = cell.Value;
Assert.AreEqual(this.AssertMethod1ExpectedValues.UIDataGridViewTableName,cellValue);
}
相关文章推荐
- Code UI Test如何配置code coverage(启用及选择所包括的文件)
- python中关于小数点后面的数四舍五入问题解决的几个函数供大家参考,现在问题是如何动态输入小数点后多少位,比如12.3000这样的
- 如何将code ui test的测试结果加入到work item
- 微信公众号平台网页授权接口中获取到的授权code传递给(即一个微信公众号网页授权给)任何其他多个回调域名下的url,解决了只能设置一个网页授权回调域名的问题,解决了redirect_uri参数错误的问
- error C2470 错误记录与解决方法。“看起来像函数定义,但没有参数列表”
- Android studio里搜索不到Genymotion,哪么如何正确的解决这问题尼!!!
- Matlab中如何使函数作为参数传递
- jquery选择器 参数为变量 如何解决
- 如何使用定时器settimeout、setInterval执行能传递参数的函数
- C#多线程函数如何传参数和返回值
- 原创:如何解决 传中文参数 显示乱码问题
- JMeter学习-027-JMeter参数文件(脚本分发)路径问题:jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: File distributed.csv must exist and be readable解决方法
- ui-sref如何传递参数
- 如何解决网页的参数传递问题
- 1.写一个函数返回参数二进制中 1 的个数 比如: 15 0000 1111 4 个 1 程序原型: int count_one_bits(unsigned int valu
- Android studio里搜索不到Genymotion,哪么如何正确的解决这问题尼!!!
- Mac App Store下载总是发生错误如何解决?
- C#多线程函数如何传参数和返回值
- 如何解决Http请求参数中加号变空格问题
- Delphi与VC如何实现变参函数,类似Format、sprintf的变长参数实现原理,va_list与Array of const