
- UBOT STUDIO COUNT RUN TIME HOW TO
- UBOT STUDIO COUNT RUN TIME INSTALL
- UBOT STUDIO COUNT RUN TIME CODE
Element div = firefox.Element( Find.ById( "ssb")) as. Opens an new Firefox window and goto the Google website.įirefox.TextField( Find.ByName( "q")).Value = "Dixin" įirefox.Button( Find.ByValue( "Google Search")).Click() Now create a new console application project, and add a reference to the new. The last step is to close all instances of Firefox, or WatiN cannot start it.
UBOT STUDIO COUNT RUN TIME INSTALL
For example, if using Firefox 3.0, I should install jssh-WINNT-3.x.xpi. It can be found in the WatiN-2.0.1.754-net-2.0\Mozilla folder. If you installed your Firefox normally, you can just ignore this step.Īnd an Firefox add-on, jssh, need to be installed.
UBOT STUDIO COUNT RUN TIME CODE
For example, I am using a green version of Firefox, so I have to modify the source code to make it return "E:\Software\Firefox\FireFox.exe", which is the path of my Firefox 3.0.6. WatiN uses Firefox.GetExecutablePath() method to find Firefox.exe. Then, pay attention to the path of Firefox.exe. The 2.0 CTP2 supports Firefox, with a lot of problems of course.įirst of all, download the 2.0 CTP2 package from here, and extract the WatiN-2.0.1.754-net-2.0 folder to somewhere, like C:\Program Files\WatiN.
UBOT STUDIO COUNT RUN TIME HOW TO
Now we know how to write automated web testing code against web products, no matter the product is built with of ASP.NET Web Form, or it is a rich Ajax application. Run this unit test, and here is the result in my machine. In this scenario, the STAThread attribute is not required for the test methods. Ie.Button( Find.ByName( "btnG")).Click() Īssert.IsTrue(hasText, search result does not contain text ""Dixin"".") In this test class, write a test method like this: using

Create a unit test project in Visual Studio add a new test class "WatiNTest.cs". It is requried because the Thread.Apartmentstate should be set to STA when using WatiN. Pay attention to the STAThread attribute for the Main method. The related elements will be highlighted when being operated. You can watch from your screen how the IE works. Writes the statistics text to the console window.

Finds the which shows the search result statistics. Ie.Button( Find.ByValue( "Google Search")).Click() Ie.TextField( Find.ByName( "q")).TypeText( "Dixin") Finds the search text field and type "WatiN" in it. Opens an new Internet Explorer window and goto the Google website. Then copy and paste the following code and press F5. Getting started with a console applicationĬreate a console application project in Visual Studio, and add a reference to. Typically, it is C:\Program Files\WatiN\1.3.0-net-2.0\bin. Let’s go through 1.3 with IE first.Īfter the installing, a couple of libraries should be found in the installation folder. The latest 2.0 CTP2 supports both IE and Firefox.

The current RTM version of WatiN is 1.3, supporting only IE. This tutorial shows how to use WatiN in Visual Studio 2008, while it can also work with other popular test frameworks like NUnit. … it will give you exactly the experience that you'll have when a customer hits the site, which ends up being a far more accurate assessment of the application quality. WatiN is developed in C# for web testing with Internet Explorer and FireFox. NET, is a very easy automated web application testing framework. WatiN (what-in), stands for Web Application Testing In.
