watin

How do you get WatiN to work on Windows Server 2008 with IE8?

My problem is that I cannot get a simple WatiN test to reliably work on my development machine which is running Windows Server 2008 and IE8. I have seen a couple of good posts on this, but am still having problems. Here are the posts: MSDN Testing Article Stack Overflow - WatiN Second Method Fails The steps in the first article see...

Watin - IE8 hangs on FileUpload.Set

Whenever I call FileUpload.Set, IE8 will open up the file browser window and just sit there without typing any text. This is on Windows XP and it used to work just fine until I upgraded from Ie7 to IE8. Anyone else run into this? ...

WatiN - Which resource contains Attribute [TestMethod] or [Test]?

I am just beginning WatiN and in a lot of blogs I see attributes like [TestMethod] or simply [Test] used. For Example: MSForge Blog Post etc. etc. but when I attempt: using System; using System.Collections.Generic; using System.Linq; using System.Text; using WatiN.Core; using WatiN.Core.UnitTests; using WatiN.Core.Constraints; usi...

Running WatiN tests with ReSharper testrunner

I'm getting started with WatiN to test my web interface. The problem I'm having is the following: When I start the tests from within TestDriven.net, I have no problem. If I use the ReSharper test runner, I get this predictable AppartmentState exception. I tried using the different options described here: http://watin.sourceforge.net/apa...

Adding a Visual Studio reference to a product under source control

As an example, I'm trying to add a reference to WatiN in Visual Studio 2008. I download WatiN and I have a folder on my desktop containing 5 files: WatiN.Core.dll WatiN.Core.xml Interop.SHDocVw.dll Microsoft.mshtml.dll WatiN.Core.UnitTests.dll WatiN.Core.UnitTests.dll.config I can add my reference to WatiN.Core.dll and start coding ...

Handling ASP.NET Forms authentication in WatiN unit tests

.NET application being tested uses <authentication mode="Forms"> so whenever an instance of WatiN.Core.IE is created the login page appears. Can successfully fill in the login form and authenticate, but wondering how to handle this for multiple tests? As soon as the IE instance is released, the next test must log in again. Does WatiN h...

Internet Explorer - Flash automation with WatiN library?

Does anyone know of a way to script flash objects using WatiN? I need a way to send arbitrary keystrokes to a flash application. I'm able to login with code such as this: ie.TextField(Find.ById("email")).TypeText(username); ie.TextField(Find.ById("password")).TypeText(password); I'm looking for something like: ie.FlashObject(Find.By...

Watin Windows Authentication

I am trying to write Watin tests for an intranet application that uses Integrated Authentication. The web page that I am trying to test prints Page.User.Identity.Name. Here is some of the code from my test: if (Win32.LogonUser(u.UserName, u.Domain, u.Password, 2 /*LOGON32_LOGON_INTERACTIVE*/, 0 /*LOGON32_PROVIDER_DEFAULT*/, out hToke...

Improving performance and speed of Watin

We're using Watin for acceptance tests and we find it gets mighty slow once we have Web pages that are more than 100K of HTML source. I've a feeling that some of the speed issues come from iterating over HTML tables. Some of our tables have 50 - 60 rows, each with 5 - 10 columns, and this makes Watin quite slow when searching for items...

WatiN: Print Dialog

Hello, I have a screen that pops up on load with a print dialog using javascript. I've just started using WatiN to test my application. This screen is the last step of the test. What happens is sometimes WatiN closes IE before the dialog appears, sometimes it doesn't and the window hangs around. I have ie.Close() in the test TearDow...

WatiN Button click Http 500 Internal Server Error

Has anyone ever encountered a HTTP 500 internal server error when clicking a button with WatiN? I have tried Click(); ClickNoWait(); FireEvent("blah"); and all of them bring me to a 500 error page. If you click the button normally with a mouse it works as intended. I have seen WatiN work randomly for this button and I think it might b...

ASP.NET MVC - Testing Page to Model Binding

Hello, I have unit tests covering my model binders. I create a ModelBindingContext and populate the ValueProviderDictionary with my test values. I feel confident that once my controller gets the model, everything is covered with testing and the right things are happening. I also feel confident that if the BindingContext is correct my...

WATIN tests failing with TimeoutException when run from CruiseControl.

We have a collection of WATIN tests we are using CruiseControl to run every hour. All the tests pass on our local machine - but when they are run using CruiseControl we get sporadic failures. We are using CruiseControl using the command line. We are not using the CruiseControl service. We are using IE8. Before each test is run - we use...

WatiN LogonDialogHandler & Windows 2000

I'm having trouble logging into a secure site with a WatiN LogonDialogHandler running on a IE6 / Windows 2000 machine. It doesn't fill in the userid/password for the proxy site, but works fine on a IE7 / Windows XP machine. Has anyone ever had/solved this problem? I found the same question on dream.in.code, but it's unanswered. I kno...

How to check if PDF was successfully opened in the browser using WatiN?

I am using WatiN library to do a quick smoke test on a web site after deployment. Among other things, I want to make sure that when I click on a specific link on my page, a PDF is opened in the browser. Clicking the link is easy, but how can I detect if Acrobat Reader was successfully opened in the browser window? I would like to catch s...

unable to recognize radio button on pop up window?

Hi, here is the code I have written IE iepopup_1 = IE.AttachToIE(Find.ByUrl("")); // It opens popup window iepopup_1.Button(Find.ById("btnContinue")).Click(); //Click on continue button to opejavascript IE iepopup_2 = IE.AttachToIE(Find.ByUrl("")); // It opens a java script window iepopup_2.RadioButton(Find.ById("DAILYPROBLEMS_1")); ie...

Watin IENotFoundException

I wrote a short bit of WatiN code (see below). it works great in Dev. Just wonderful. When I deploy it to the production server it opens IE, then fails with an IENotFoundException. .NET 3.5 Server 2008 IE 7.0.6 I'm at the point where I'm getting ready to download the source and debug, but I'm not sure how far I'll get as I have yet ...

WatiN Test Project Best Practices

After building up and running lots of WatiN tests, what are some good ways to organize the tests? If I was asked "Do we have a test that does X, then Y?" How would I look that up? Would it be with all tests surrounding X or Y? It seems after getting lots of tests in here, organization becomes a bit of an issue. I'm just looking for some...

Watin Dispose() is really slow.

Hi, My watin tests have suddenly gotten REALLY slow when I dispose the IE object. Here's my setup... * Windows 7 (Evaluation Build 7100) * IE 8 (Version 8.0.7100.0) * Watin (Version 2.0.10.928) This is strange cause the tests were working fine a week or so ago. I think it's the latest MS Updates or something. Thanks Any ideas? ...

WATIN and multitabbed IE

Hi all I have a WATIN test like the following: ... [Test] public void IE_should_launch_on_correct_url() { // do something here that should launch IE ... _ie = IE.AttachToIE(Find.ByUrl(someUrl)); ... Assert.IsNotNull(_ie); } [TearDown] public void Tidy() { _ie.Close(); } ... If there's another IE (7) opened, the f...