watin

Watin Tests fail on CC.Net

霸气de小男生 提交于 2019-11-26 16:33:04
问题 I'm running Watin tests with xUnit on CC.Net under Windows Server 2003. I have lots of tests that all run fine on development boxes with TestDriven.Net and on the server with the xUnit gui app. However, when CC.Net runs the tests (as part of an MSBuild task) the function ie.ContainsText("some text to find"); never returns the expected value. Other functions and properties on the IE object appear to work fine: Button(...).Click(), TextBox(...).Value, etc. I am aware that the service account

How to determine if CSS has been loaded?

跟風遠走 提交于 2019-11-26 16:07:42
问题 How can i Assert that the CSS for a page has successfully loaded and applied its styles in Watin 2.1? 回答1: After doing some research and writing up my answer, I stumbled upon this link that explains everything you need to know about CSS, when it is loaded and how you can check for it. The link provided explains it so well, in fact, that I'm adding some quotes from it for future reference. If you're curious, my answer was going to be #2 and a variation of #4. When is a stylesheet really loaded

How to test file download with Watin / IE9?

本小妞迷上赌 提交于 2019-11-26 14:01:29
问题 I'm trying to test file download with Watin 2.1.0 against IE9. I used the suggested code from the accepted answer to the question Downloading a file with Watin in IE9, like this: var downloadHandler = new FileDownloadHandler(fname); WebBrowser.Current.AddDialogHandler(downloadHandler); link.ClickNoWait(); downloadHandler.WaitUntilFileDownloadDialogIsHandled(15); downloadHandler.WaitUntilDownloadCompleted(200); However, the downloadHandler.WaitUntilFileDownloadDialogIsHandled(15) call times

Programmatically add trusted sites to Internet Explorer

给你一囗甜甜゛ 提交于 2019-11-26 09:44:49
问题 I\'m doing an IE automation project using WatiN. When a file to be downloaded is clicked, I get the following in the Internet Explorer Information bar: To help protect your security, Internet Explorer has blocked this site from downloading files to you computer. In order to download the report, I can manually add the site to Internet Explorer\'s list of trusted sites, but I would prefer to check programmatically in .NET to see if the site is trusted and add it to the list if it is not. FYI, I

How to write to Console.Out during execution of an MSTest test

落爺英雄遲暮 提交于 2019-11-26 08:00:07
问题 Context: We have some users reporting issues with a file upload feature in our web application. It only happens occasionally and without any special pattern. We have been trying to figure it out for a long time, adding debug information anywhere we can think it might help, crawling the logs etc, but we have not been able to reproduce or figure it out. Problem: I\'m now trying to reproduce this by using MSTest and WatiN to repeat the operation that is supposed to fail a large number of times