Questions tagged [watin]

WatiN aims to bring you an easy way to automate web testing with Internet Explorer and Firefox using .Net. Since the start of the project in 2005, WatiN has grown into an easy to use, feature rich and stable framework. WatiN is developed in C# and inspired by Watir.

Features include:

  • Automates all major HTML elements
  • Find elements by multiple attributes
  • Supports AJAX website testing
  • Supports frames (cross domain) and iframes
  • Supports popup dialogs like alert, confirm, login etc..
  • Supports HTML dialogs (modal and modeless)
  • Provides a Page and Control model.
  • Supports creating screenshots of webpages
  • Has a basic (extensible) logging mechanism
  • Easy to integrate with your favorite (unit) test tool
  • Works with Internet Explorer 6, 7, 8, 9, 10 and FireFox 2 and 3
  • Developed in C#
  • Licensed under the Apache License 2.0
1045 questions
149
votes
15 answers

WatiN or Selenium?

I'm going to start coding some automated tests of our presentation soon. It seems that everyone recommends WatiN and Selenium. Which do you prefer for automated testing of ASP.NET web forms? Which of these products work better for you? As a side…
DavGarcia
  • 18,540
  • 14
  • 58
  • 96
131
votes
6 answers

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

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…
Julian
  • 20,008
  • 17
  • 77
  • 108
73
votes
3 answers

WatiN Error Could not Load Assembly

I am getting the following WatiN error: Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db7cfd3acb5 ad44e' or one of its dependencies. The …
azamsharp
  • 19,710
  • 36
  • 144
  • 222
40
votes
7 answers

WatiN System.IO.FileNotFoundException Interop.SHDocVw

I have just started to receive the following error when running my WatIn tests. System.IO.FileNotFoundException : Could not load file or assembly 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=db7cfd3acb5ad44e' or one of its…
Gilbert Liddell
  • 1,203
  • 4
  • 14
  • 21
28
votes
5 answers

How to determine if CSS has been loaded?

How can i Assert that the CSS for a page has successfully loaded and applied its styles in Watin 2.1?
Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
26
votes
3 answers

WatiN: The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer

I am calling WatiN from a C# windows service. When I invoke WatiN it throws the following exception. The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer I have tried starting up a…
Jonathan
  • 2,318
  • 7
  • 25
  • 44
24
votes
6 answers

Unable to fire jQuery change() event on selectlist from WatiN

I have a select box And jquery $('#myselectbox').change(function() { ... }); And a WatiN test SelectList list =…
fredw
  • 1,409
  • 12
  • 23
21
votes
5 answers

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…
Kirk Liemohn
  • 7,733
  • 9
  • 46
  • 57
18
votes
3 answers

How do I find the position / location of a window given a hWnd without NativeMethods?

I'm currently working with WatiN, and finding it to be a great web browsing automation tool. However, as of the last release, it's screen capturing functionality seems to be lacking. I've come up with a workable solution for capturing screenshots…
Robert P
  • 15,707
  • 10
  • 68
  • 112
17
votes
5 answers

Running Watin on TeamCity

I'm trying to run a simple Watin test through TeamCity but the Internet Explorer window is never shown as is usually is via CruiseControl. I get an error that it can't find a text field so something is running. But i can't see what without the…
Sammy Elal
  • 381
  • 2
  • 7
15
votes
4 answers

Watin - Handling Confirm Dialogs with ConfirmDialogHandler

Using Watin, I'm trying to handle a confirm dialog box and tell watin to press "OK". This is reasoanbly well documented on the internet - you use a ConfirmDialogHandler and the UseDialogOnce method.. Except it isn't working for me. I get the…
Matt Roberts
  • 26,371
  • 31
  • 103
  • 180
15
votes
4 answers

WatiN.Core.IE component giving Timeout while Internet Explorer busy error while opening a URL

I am using WATin IE component for browsing a specific website On StartBrowsing button click event I am initializing the object of WatiN.Core.IE and passing the website URL for opening the website as shown in the code snippet below :- WatiN.Core.IE…
Ankush Roy
  • 1,621
  • 2
  • 15
  • 25
14
votes
7 answers

Programmatically add trusted sites to Internet Explorer

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…
Even Mien
  • 44,393
  • 43
  • 115
  • 119
13
votes
6 answers

Pass a key stroke (i.e., Enter Key) into application using WatiN scripts

I'm using WatiN testing tool. Can I pass a key stroke (i.e., pressing a enter key) to the application using WatiN scripts? This option was available in WatiR. Is this option available in WatiN?
vinaykumar
13
votes
3 answers

Hiding Internet Explorer when WatiN is run

I would like to know how I can prevent Internet Explorer from firing up every time I run my console application which uses WatiN for testing live sites. When I run my console application it fires up internet explore and runs through all the tests…
user188521
1
2 3
69 70