|
请教一下,在使用silktest进行数据驱动的时候,已经设置了一个excel文件,将要替换的数据保存在里面了。我把脚本里要替换的地方都做了数据驱动,执行也是可以的,但是在执行之后还是有报错,报错的地方显示的是窗口的标题silktest没有抓取到,这种情况下怎么办啊?我想做到数据驱动后报告直接显示passed,没有红色的error。
下面是我的脚本:
[+] // *** DATA DRIVEN ASSISTANT Section (!! DO NOT REMOVE !!) ***
[-] testcase DD_Test2 (REC_DATALIST_DD_Test2 rData)
[-] recording
[ ] 百度一下.SetActive( )
[ ] 百度一下.HtmlTextField("&id='kw';name='wd'|图 片|$wd").SetText(rData.recSheet1_.关键字)
[-] 百度一下.HtmlTextField("&id='kw';name='wd'|图 片|$wd").VerifyProperties ({...})
[ ] ""
[-] {...}
[ ] {"Enabled", TRUE}
[ ] {"SelText", ""}
[ ] {"Text", rData.recSheet1_.关键字}
[ ] 百度一下.HtmlPushButton("&id='sb'|百度一下|$sb").Click ()
[ ] Browser.BrowserChild("百度搜索_士兵突击").HtmlTextField("&name='wd'|图片|$wd[1]").SetText(rData.recSheet1_.关键字)
[ ] Browser.BrowserChild("百度搜索_士兵突击").HtmlPushButton("百度一下[1]").Click ()
[-] Browser.BrowserChild("百度搜索_士兵突击音乐").HtmlTextField("&name='wd'|图片|$wd[1]").VerifyProperties ({...})
[ ] ""
[-] {...}
[ ] {"Enabled", TRUE}
[ ] {"SelText", ""}
[ ] {"Text", rData.recSheet1_.关键字}
报错的error:
[ ] Script 2.g.t - 3 errors
[ ] Machine: (local)
[ ] Started: 11:18:13AM on 22-Feb-2008
[ ] Elapsed: 0:00:55
[ ] Passed: 0 tests (0%)
[ ] Failed: 3 tests (100%)
[ ] Totals: 3 tests, 3 errors, 0 warnings
[ ]
[-] Testcase DD_Test2 ({{"测试"}}) - 1 error
[ ] *** Error: Window '[BrowserChild]百度搜索_士兵突击' was not found
[ ] Occurred in Browser.BrowserChild("百度搜索_士兵突击").HtmlTextField("&name='wd'|图片|$wd[1]")::SetText
[ ] Called from DD_Test2 at 2.g.t(38)
[ ] Called from DefaultRunDataDrivenTestCase at datadrivetc.inc(383)
[-] Testcase DD_Test2 ({{"开发"}}) - 1 error
[ ] *** Error: Window '[BrowserChild]百度搜索_士兵突击' was not found
[ ] Occurred in Browser.BrowserChild("百度搜索_士兵突击").HtmlTextField("&name='wd'|图片|$wd[1]")::SetText
[ ] Called from DD_Test2 at 2.g.t(38)
[ ] Called from DefaultRunDataDrivenTestCase at datadrivetc.inc(383)
[-] Testcase DD_Test2 ({{"产品"}}) - 1 error
[ ] *** Error: Window '[BrowserChild]百度搜索_士兵突击' was not found
[ ] Occurred in Browser.BrowserChild("百度搜索_士兵突击").HtmlTextField("&name='wd'|图片|$wd[1]")::SetText
[ ] Called from DD_Test2 at 2.g.t(38)
[ ] Called from DefaultRunDataDrivenTestCase at datadrivetc.inc(383)
这里先谢过~~ |
|