watin

Can I read JavaScript alert box with WatiN?

I want to use WatiN to verify the error message in a JavaScript alert box. Is this possible? Thanks. ...

Try catch in assert statement

I am doing regression testing using NUnit, WatiN and VB.net. What i am doing is opening an IE page, seleting some data, making a registration and then on view registration page testing the registration by assertion. I want to ask is it a good way to use try and catch on every assert. i am using it because if some assert fails it will st...

Nunit results

I am using Nunit results for managerial view of all the tests. After reading nunit doc it says it automatically update the results xml file after running the tests. But In my case it keep showing me the old results in index file where as updated reults in actual file. Any idea how can I update the index file according to the latest resul...

running nunit summary after completion of NUnit tests in a batch file

I want to to run nunit summary.exe after successful completion of NUnit Tests assembly. I am calling nunit from a batch file and then I want to call nunit summary. Any idea how to do this ...

Watin in TFS?

I'm trying to get my WATIN tests to work in TFS2008 (continuous integration) as part of a nightly build. All tests work fine on my local machine (from VS2008), and my unit tests (non-watin) work great locally, as well as in TFS. to illustrate what we're doing I've got a simple test: [TestMethod] public void Watin() { ...

Running WatIn on TeamCity

I'm trying to run a simple WatIn test through TeamCity but the IExplorer window is never shown. Like it is usally through CruiseControl. I get an error that it can't find a text field so something is running. But i can't see what with out the window. Is there a specific setup of TeamCity server that i need to do? ...

How can I clear a selected radio button in WatiN?

I have a long form to test, so I created a CompleteForm() helper method to complete the form. To test the validations, I am calling CompleteForm() and then making the field I want to test invalid. Can't figure out how to uncheck the radiobuttons. ...

Watin test hang application while uploading file

I have an issue with watin test that should browse for pdf and upload it to a web page. This test runs smoothly on my machine, always find pdf, click submit and wait 30 sec for upload completed. But when I try to run this test on build machine (teamcity), happens that test hang at the point when it should wait for upload. The problem...

How do I Click a Table tag using watiN?

This is the table tag which i need to click . I guess this is invokes some JS function. I dont know howto resolve it . table id="btnTbl_compose:send_message" class="buttonTable axsButton" cellpadding="0" title="Send this message (Ctrl+Enter) | Send this message and keep existing Draft (Shift+Click)" boid="messageToolbar_compose:send_mes...

Watin Tests fail on CC.Net

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

Launch IE from a windows service (more or less)

I want to use CruiseControl.net as a service and have it launch the Fitnesse test runner as a task to run a bunch of acceptance tests using the watin fixture which starts IE. Oh and I want to do this all on a virtual server. The above all works fine if I'm not running CC.Net as a service (ie. log in to the server via remote desktop and ...

Watin - how to test site with popup pages

I'm using WatiN (Web Application Testing in .Net) to do integration testing on a Dynamics CRM 4.0 website. CRM uses a lot of popup windows - eg clicking on a Contact in a list opens a new browser window with the Contact's details. I want to test: login to CRM (done) go to the Contact list (done) click on an Contact, thus trigger the p...

WatiN, VBScript

I am using WatiN for my web tests. In one of my web pages, I have a VBScript function which opens a dialogbox. I am unable to access it using WatiN. I tried using WatiNTestRecorder; it was unsuccessful. I tried this also: http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2008/07/16/scenario-testing-with-watin.aspx, unsuccessf...

WatiN in Visual Studio 2008 - second test method fails

When trying to run a very simple WatiN 2.0 (CTP3) test in Visual Studio 2008 I found that the first one always executes fine. The second test method seem to break something in the IE object producing the following exception: Test method testProject.WatinTest.testTwo threw exception: System.Runtime.InteropServices.InvalidComObj...

Dialog not available within 60 seconds

I am trying to use Dialog handler twice in a function. For first time it executes well but on second time it hangs the system with dialog box open and showing Ok and Cancel butoon but never able to click it. Also it times out with an error "Dialog not available within 60 seconds" Dim cdhPopup As ConfirmDialogHandler cdhPopup = New Conf...

Manage Test Data: Can you enlist all db connections into a single transaction?

Hi all, We are currently using Watin to do UI testing on our web application. In effect we are doing integration testing from top to bottom since we are using a test database and not mocking. In order to make sure the test database is in an expected state we have previously been using SQL Server's snapshot feature to rollback the data...

Using WatiN, how can I access the head part of the page, specifically the meta tags?

WatIn provides great functionality for programmatic access to the displayed parts of a Web page. I want to access the head part of the page, spedifically the META tags. Watin allows me access to the TITLE, but AFAICT nothing else. There is an InternetExplorer property which allows access to ShDocVw.InternetExplorer. I suspect this mi...

Using Excel for storing data is better or XML for automation Testing

I am using WatiN for automation testing. I need to save few values for future reference in my application. I need to know whether Excel is a good approach for storage or I rather use XML for this purpose. Kind regards ...

Timeout while Internet Explorer busy

During execution of tests on ccnet server. Some of the tests fails saying Timeout while Internet Explorer busy and hangs the system and at the end show the old results-xml file in nunit results even I am using a clean build. ...

Downloading webpage image from SSL + WatiN

I've been thinking about this and can't seem to find a way to do this: I've got some code running on WatiN 2.0 which connects to a site via an SSL tunnel, and after performing certain tasks (which there're no other feasible ways to automate without relying on a browser) should be able to download an image from the very same SSL connectio...