开发者

What specific issues are there to be aware of when attempting to use WatiN in .NET Framework 4.0 test projects?

My situation is this: I have an ASP.NET web application that I want to implement tests for. When I initially tried WatiN, I was able to get the Google search example working, and a small test for one of the pages of the web application. But once I added the WatiN assemblies to a shelveset so a co-worker could try out my tests, WatiN stopped working on my machine.

Instead of successfully running tests, I get exceptions like this one:

WatiN.Core.Exceptions.WatiNException: Element wasn't available within 30 seconds.

The only thing WatiN seems to do right now is launch the browser with the URLs I've hard-coded. Any suggestions on what to do in order to get this working with .NE开发者_高级运维T Framework 4.0 again would be greatly appreciated.


Working on Framwework 4.0 or else doesn't really change anything, at the end of the day WatiN works with the UI no matter what language you're building your page with..

Yet, if your page performance is a bit slow, or your forms have lots of controls (that's pretty usual), WatiN usually becomes a bit slow in doing thing, so you need to set the timeout to more than 30 sec.

I guess you need check/use methods that wait, for eg ie.WaitUntilContainsText("text", timeOut) & other methods that set its timeout..

btw I just ran also into a similar question here, you might wat to check it

Timeout problem running WatiN tests as part of TFS build

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜