WebAii™ DocumentationLanguage Filter
C# VB

Go back to ArtOfTest homepage.
logo
Skip Navigation Links.

Looking for a topic you can't find here? Feel free to let us know.

Getting Started with WebAii

Thanks for using WebAii Automation infrastructure. To get started using WebAii, please follow the instructions below. If you have further questions, feel free to contact us.

IMPORTANT

  • Please uninstall any previous WebAii installations on your machine before installing the current version.
  • If you are upgrading from 1.0 to 1.1, please make sure to also uninstall the WebAii 1.0 Firefox extension before installing 1.1. 1.1 and future WebAii versions will automatically install their respective Firefox extensions. No manual steps are needed.
Installing and setting up the infrastructure.

To get started, first download the WebAii installer package directly from the Products page. Once the installation is complete, you will have all of the following placed in the WebAii %InstallDir% folder:

  • The WebAii Automation Infrastructure library. ArtOfTest.WebAii.dll
  • WebAii's Internet Explorer client. ArtOfTest.InternetExplorer.dll
  • WebAii's Firefox client. Automatically installed in your install directory.
  • ASP.NET TestRegion Custom Control. ArtOfTest.WebAii.AspNet.dll
  • Visual Studio item templates for VS Team Test & NUnit (Both VB.NET and C#).These are automatically registered with Visual Studio
  • 80+ Unit Test Code Samples to help illustrate the different features of WebAii. You will find 4 zipped solutions: (NUnit_C#,VSTS_C#,NUnit_VB,VSTS_VB). You can use the sample that fits your language and framework of preference.
  • Release notes. ReleaseNotes.txt
  • API Reference help file. Documentation.chm
  • Link to the online Documentation including the Getting Started Guide.
  • Link to the online product feedback form.

Only needed when using WebAii 1.0.
Both the WebAii library and the Internet Explorer client are installed and ready to use once the installation is complete. The templates are also installed into your local templates for the current user. You also have a copy of these templates under %InstallDir%\Visual Studio Templates\. Firefox client is not automatically installed. If you wish to also support Firefox, you can simply install the Firefox client using the following simple steps.

Starting automation using WebAii.
  • If you are using Visual Studio Team Test, please reference the Using Visual Studio Team Test topic.
  • If you are using NUnit, please reference the Using NUnit topic.
  • If you are not using NUnit or Visual Studio Team Test, you can still use WebAii from a Console Application, a Class Library or a Windows Application. Simply follow the rest of the instructions below.

Once WebAii is installed on the target machine, you can easily start using it from your .NET project by simply referencing the ArtOfTest.WebAii.dll placed in your %InstallDir%. That is the only dll you need to reference to get the full functionality of WebAii. To reference the WebAii library:

  1. Select your project in the Solution Explorer in Visual Studio.
  2. Right-click and select 'Add Reference...'
  3. Navigate to the ArtOfTest.WebAii.dll installed on your machine in your %InstallDir%
Quick start sample code

Before calling into any of the WebAii library methods, you need to make sure that you have properly initialized an instance of the Manager object passing in the settings you want used for this instance. To initialize the project:

C#

            // Initialize the settings you want used.

            Settings mySettings = new Settings(BrowserType.InternetExplorer, @"c:\log\");

 

            // Create the manager object

            Manager myManager = new Manager(mySettings);

 

            // Start the manager

            myManager.Start();

 

            // Launch a new browser instance. [This will launch an IE instance given the setting above]

            myManager.LaunchNewBrowser();

 

            // Navigate to a certain web page

            myManager.ActiveBrowser.NavigateTo("http://www.google.com");

 

            // Perform your automation actions.

            Element mybtn = myManager.ActiveBrowser.Find.ByTagIndex("input", 3);

            myManager.ActiveBrowser.Actions.Click(mybtn);

 

            // Shut-down the manager and do all clean-up

            myManager.Dispose();

Visual Basic

        ' Initialize the settings you want used.

        Dim mySettings As Settings = New Settings(BrowserType.InternetExplorer, "c:\log\")

 

        ' Create the manager object

        Dim myManager As Manager = New Manager(mySettings)

 

        ' Start the manager

        myManager.Start()

 

        ' Launch a new browser instance. [This will launch an IE instance given the setting above]

        myManager.LaunchNewBrowser()

 

        ' Navigate to a certain web page

        myManager.ActiveBrowser.NavigateTo("http://www.google.com")

 

        ' Perform your automation actions.

        Dim mybtn As Element = myManager.ActiveBrowser.Find.ByTagIndex("input", 3)

        myManager.ActiveBrowser.Actions.Click(mybtn)

 

        ' Shut-down the manager and do all clean-up

        myManager.Dispose()

The Manager object exposes all methods/properties needed to perform browser automation, element identification, logging and DOM traversal including TestRegion identification. Below is a brief description of the key objects exposed off the Manager and their corresponding key object properties/methods:

Object Type Name Brief Description Key Objects/Methods Exposed Quick Start Tutorials
Manager.ActiveBrowser ArtOfTest.WebAii. Core.Browser The most recent launched browser instance. You can use it to invoke actions, access the loaded document DOM and perform element identification an extraction using the Browser.Find object. Browser.Actions, Browser.Find, Brower.DomTree, Browser.Window Automating Browser Actions, Finding Page Elements, Multi-Browser Instance Support, JavaScript Support
Manager.ActiveBrowser.
Actions
ArtOfTest.WebAii. Core.Actions Used to invoked direct Dom actions against the loaded document Actions.Click, Actions.SetText, Actions.Check, Actions.WaitForElement Automating Browser Actions, Ajax support, JavaScript Support
Manager.ActiveBrowser.
Find
ArtOfTest.WebAii. Core.Find Used to search the DOM elements of the associated browser Find.SearchRegion Finding Page Elements, Introduction to TestRegion's, FindParam's as External Xml DataSource
Manager.ActiveBrowser.
DomTree
ArtOfTest.WebAii. Core.TreeBuilder The full DomTree of the currently loaded document. TreeBuilder.TestRegion's, TreeBuilder.Root Finding Page Elements
Manager.ActiveBrowser.
Window
ArtOfTest.WebAii. Win32.Window The window representation of this browser window. Use this object to manipulate the browser window and capture bitmaps. Window.Handler, Window.GetBitmap() Native Win32 Windows Handling, Visual Capturing
Manager.Desktop ArtOfTest.WebAii. Core.Desktop Used to invoke pure UI automation events from the Mouse & Keyboard Desktop.Mouse, Desktop.Keyboard Automating Browser Actions
Manager.Log ArtOfTest.WebAii. Core.Log Provides logging support for the current manager session Log.WriteLine, Log.CaptureBrowser() none
Copyrights © 2007 ArtOfTest, Inc. All rights reserved. Privacy Policy | Terms of Use