watin

Using WaitN to crawl to next page on google

Hello, Can someone guide me on how I can navigate to the next page using WATIN ? I need to automate clicking on the page numbers on the bottom from 1,2, until the end... Thanks. ...

Opening a Specific Email in GMail Using C# and WatiN

I've been working with sending and receiving email through various web-mail clients using WatiN, I've got logging in, writing and sending emails working perfectly, however I am having issues opening specific emails. Each email I send has a specific id codein the subject, but I can't work out how to tell WatiN to actually click the speci...

C# WatiN - Add an AlertDialogHandler to click ok button on every Alert dialog window

Hello Those who have used WatiN likely also used DialogHandlers. Well can someone teach me how can i assign a DialogHandler that will handle any Alert Box window.alert(), of a specific IE instance under WatiN control . The DialogHandler only has to click in the OK button for very alert dialog box, in that case i think we need an Aler...

How to do really mutithreaded web mining with IE/.Net/C#?

I want to mine large amounts of data from the web using the IE browser. However, spawning lots and lots of instances of IE via WatiN crashes the system. Is there a better way of doing this? Note that I can't simply do WebRequests - I really need the browser due to having to interact with JS-driven behaviors on the site. ...

To retain objects of a page while redirection

Hi all, i am writing a test case which causes page redirection while looping between rows in a table... Here is my code - public void dashboardprivatefunctionality() { TableBodyCollection pbody = ieinstance.Table(Find.ByClass("GridStyle1")).TableBodies; foreach (var tb in pbody) { ...

jQuery form submit handler doesn't trigger when textField changes by Watin in MVC Asp.net app

I am writing Watin test in MVC Asp.net app. I mvc app, all input are wrpped with form and every time an input or textarea is changed their form gets submitted by jquery like code below: $("textarea", context).change(function() { $(this).parents('form:first').submit(); }); This is perfect when changes are done by keyboard. How...

Watin's IEElement.ClickOnElement throwing COMException when clicked on an anchor tag and page is set to popup a confirm dialog on OnBeforeUnload event

I'm autmating the UI of our web application using Watin. One of the page (X) has got an anchor tag which navigates to another page (Y). Page X pops up an confirm dialog on "OnBeforeUnload" event. So when someone manually clicks on the anchor tag, the confirm dialog pops up and when user clicks on the ok button the navigation continues. I...

Show Save As Dialog of IE using Watin

Anybody has done this? Navigating to a web page and pop up the save as dialog? In this way, the browser can handle the file type, html, pdf, etc... ...

watin - Settings.FindByDefaultFactory - doesn't seem to use my custom FindByDefaultFactory

Based on this article, I've written a custom class which implements the Watin.Core.interfaces.IFindByDefaultFactory, but I don't think I'm correctly assigning it to the watin settings, because it is never used. Basically, Where/when should I assign to the Settings.FindByDefaultFactory? I've tried in my test Setup, and the text fixture's...

How to handle wizard by WATIN in IE8

I am using WATIN Version(1.3.0) I am in a situation that when i click on a node ,a Wizard appear. That wizard contain several controls(checkboxes,buttons and TextFields) and it has many screens(when next button is pressed , the next screen appear) but i am unable to handle it. I have apply the following techniques but failed I have u...

How to deal with runscriptexception in watin

When I selected some option on a javascript generated select box, WatiN throw a runscriptexception. I do not know what does this mean. It seems watin needs some privilege to run the script behind. I wonder if I should use different way to handle javascript object. I appreciate for any help or suggestion. frank ...

Watin & Google Searches

Hi, I'm trying to use Watin to parse google search results. However watin is unable to find elements i the Google Search Result page. When I view the source it's because the page is generated off javascript so the search results are not sent over the wire in html. However when I open up Firebug (in Firefox) I am able to parse the ht...

SelectListItemNotFound Exception using MvcContrib.TestHelper.WatiN with SelectList

When I try to use the MvcContrib.TestHelper.WatiN API to conduct UI unit testing that utilizes AJAX to populate select lists, I receive a SelectListItemNotFound Exception. Aside from using a Sleep statement, is there some way of "pausing" until the list is filled? The link, http://pushpontech.blogspot.com/2008/04/ajax-issues-with-watin...

Can WatiN open a html/js doc that is compiled into an Nunit test assembly?

MVC 2 app with a Web project (including external JS files used by Views) and a Tests project (including a Nunit test to launch QUnit tests with WatiN). Everything runs fine if I include the QUnit test html and JS in the Web project and use Cassini to launch it. However, I want to avoid having any QUnit test code in the Web project, so ...

WatiN Timeouts in Windows Server 2008 IE8

I've created some automated tests using WatiN and MBunit and they run fine on my machine (running Windows 7 and VS 2010). However, when I try running them on a virtual machine which is running Windows Server R2 2008 and IE8 my tests consistently timeout unless I am clicking into the window periodically. IE is not in protected mode. A...

Fileuploader not working on IE Browsers

I need to upload files on page. For this i use FileUpload class in watin but it hangs when fileupload dailog box opened... Here is the code for it - FileUpload filePlan = projectbrowser.FileUpload(Find.ById("filePlan")); filePlan.Focus(); filePlan.ClickNoWait(); I am unable to set file for upload class. i also used filupload.set ("fi...

WatiN clicknowait() doesn't work in firefox

Hello i'm using WatiN for test the UI of a website in both IE and Firefox, but I ran into a problem. When I Click on a tag with a specific class name, an alert dialog should appear, and I wan't to click ok. So, I'm using UseDialogOnce like below. This code works flawlessly in IE, but it stucks in the ClickNoWait() function when I try i...

WatiN with proxy

I've been doing some testing with WatiN lately. For one of the tests I will need to use a proxy to perform the tests. I can set the proxy manually from IE, but I want to do it programatically. In the past I've had success setting proxy for webbrowser control using the code from here http://social.msdn.microsoft.com/Forums/en/Vsexpressvb...

WatiN with webbrowser

I'm using the following code to bind watin to a webbrowser on the winform. Dim w As IE = New IE(WebBrowser1.ActiveXInstance) Settings.AutoStartDialogWatcher = False w.GoTo("http://google.com") I can see from wireshark that the page get's loaded, but the form is frozen until a exception gets thrown "Timeout while Internet Explorer busy...

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

I have a select box <select id="myselectbox"> <option value='a'>First option</option> <option value='b'>Second option</option> </select> And jquery $('#myselectbox').change(function() { ... }); And a WatiN test SelectList list = Browser.SelectList(Find.ById("myselectbox")); list.Select("First option"); In IE, thi...