watin

WatiN File Upload

I've hit a snag. I am trying to use WatiN to upload a file. I can load the upload box, but it quickly disappears. The last line of my code at the moment is: ie.FileUpload(Find.ById("profile_file")).Click(); It loads the dialog to select a picture but disappears. Is it possible to set the path of the box automatically example, load "C:...

How do I get all the <li> elements from within a div using Watin?

Hello.. I have never used Watin before today. I need to get a collection of 'li' elements that are within a 'div' <div id="myDiv"> <ul> <li>a</li> <li>b</li> <li>c</li> </ul> </div> I only want the li elements within the div id='myDiv'.. Thanks for any help! ...

Watin AddDialogHandler method throwing null reference exception in FF

I'm trying to add ConfirmDialogHandler to dialog handler and i get NullReferenceException. This happens on FF 3.6 with latest watin version, the same code works on IE7 and 8. ConfirmDialogHandler confirmDialogHandler = new ConfirmDialogHandler(); browser.AddDialogHandler(confirmDialogHandler); // --> exception here Any ideas? ...

mouse pointer jumps to upper left corner when opening a new explorer window using watin

Hi all, Every time I create a new WatiN IE instance the mouse pointer jumps to the upper left corner of the screen and the focus switches to the new window. I want the application to run the background so I've set the option for the new window to not to be visible: Settings.Instance.MakeNewIeInstanceVisible = false; But the mouse j...

Problem hiding Internet Explorer in WatiN, even when using Settings.Instance.MakeNewIeInstanceVisible = false

This question is more of a follow-up to this one: Hiding Internet Explorer when WatiN is run Like the person who asked that original question, I also want to stop IE from being shown when my WatiN tests are running, but even when using this setting in a seemingly correct manner (code snippet below), it still ends up showing an empty IE ...

How do I close the browser (IE8) using Watin?

Hello, I am using Watin 2.0 to develop some automated UI tests. I cannot get Watin to close the browser after it has opened it. The Watin.Core.Browser object implements IDisposible but Dispose() does not do the trick. I have also tried using the Close() method. Most recently I have tried wrapping the IE object instantiation in a Using ...

How to automate clicking in a 3rd-party Java applet?

Okay, here's my problem: I'm using WatiN to navigate a website, but then a java applet pops up in a separate window. Ideally, I'd like to automate that window (list box selections, key presses and the like) with something like the equivalent of NUnitForms or something... can someone give me a suggestion on how to do it? Note that I don't...

When chrome will be supported by watin

Is there an official date for the chrome browser support by WatiN. If there is an a beta support i'll be glad to receive a reference. ...

WATIN recorder replay

Watin has recording capability but does it have a replay/playback capability. For instance the clicks will be replayed on the browser (just as it was recorded) ...

using regular expression in watin

I'm using regular expression in watin. I have something like: ie.Button(Find.ByName(new Regex(input))).Click(); but I wan't to click on the second or third button that match and not the first one. How can I do this? ...

Search for cascading element using watin

Please tell me the way to search a cascading element in a page. For example, there are 10 anchor element tags used in a page. I can simply reach an element using FindBy method i.e. Element.FindBy(). But what to do when i have a cascading element on a page css like ".lineItem .title a" ...

WatiN - Find Form By Element

Hello, I have a sample webpage: <form action=blabla.php methog=post>...</form> <form action=blabla.php methog=post>...</form> <form action=blabla.php methog=post>...</form> <form action=blabla.php methog=post>...</form> <form action=blabla.php methog=post><textarea name="data"></textarea><input type="submit"></form> I want to set text...

Attach Watin to WebBrowser (WPF)

I've scoured the internet (including answers from this site) but nothing appears to work for me. Does anyone know the correct approach to attach WatiN to a WebBrowser instance (Windows Presentation Forms version)? Most of the answers I've read tell me about 'ActiveXInstance', which is not visible in the WPF version of WebBrowser. I've ...

Keynot Handled error while opening IE using visual studio c# 2008 express edition

I am using Watin Test recorder for the first time, setup the tutorial, i have installed visual studio 2008 C# edition,i have added reference to Watin.core.dll, i have build the project and as soon as i hit run, watin displays error as "The given key was not present in the dictionary**".... Anyone had this problem ? code: using System;...

C#, right click in internet explorer using watin

Hello all, Using WatiN, I'm loading up http://maps.google.com/ All I want to do is right click the map and click "Center map here" when the context menu pops up. Another great feature would be to be able to "drag and drop" the mouse on the map so as to make the map scroll. I would really appreciate some help. Thankyou very much, Fid...

starting my console application at background

my client wanted my C# console application which run internet explorer,to start work as a background window plus the internet explorer window that watin opens to be on background. i use visual studio 2005 and watin ver. 2.0.20.1989 . any answer to how i can do this? ...

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 st...

ASP.net/C#: How compile classes in App_Code so that can be run from command line for unit testing?

I have several class files in App_Code in an ASP.net website running in Microsoft Visual Studio 2005 Professional. In liu of using a full unit test suite I just want to somehow compile those project-wide classses into an .EXE so that I can nightly run unit tests on them. I do know how to create a separate C# library project consisting ...

Couldn’t attach to manually started Firefox 3.6 browser using WatiN 2.0 RC1

When I manually start Firefox and then try to attach to it using Browser.AttachTo(Find.First()) method, this results in exception "Couldn't find an ForeFox window..." But when I start FireFox by this command in the first console application: new FireFox(@"http://google.com") and after that try to attach to it using Browser.AttachTo(Find...

how to intercept firefox events in .net?

i'm using watin,to control a firefox browser,but there's no support for events like page load,& progress.. i need a way to expose this events through .net,i tried a bit with xpcom from geckofx but with no vain due to lack of documentation,, thanx in advance ...