开发者

WAtIn identifying dynamic objecti nc3

I recently downloaded WATIN to run simple automated testing tasks and encountered an issue when recording using the test recorder tool. It records the control asp.net name ,but the control is a user contr开发者_开发知识库ol and dynamically increments its value as shown below and causes an error(can't find ) in playback:

ctl00$phPageContents$__businessTransactionControl_2694$ucVehicleSearchPopupControl$txtIdentificationNumber

The value 2694 is dynamic and increments by 1 each time the control is accessed so the next time that page is accessed, that value will be 2695

I attempted a couple regex solutions, but wondered if anyone knows of a simple solution for this?


It's important to note that the WatiN recorder is a separate project to the WatiN core.

The problem you highlight is common to most test recording devices. If you manually write your tests they can be much more robust. For instance in this case you could find by something other than Id, such as text or class.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜