Art Of Test WebAii Tests Web UI

My colleague have some problems using Selenium to test the website specifically issues with JavaScript and Ajax. Also we would like to include testing nicely and easily integrated into our build process with continuous integration.

So we did together a bit of searching and found the free .Net automation framework for web testing produced by Art Of Test Inc called WebAii. Just see from the demo it seems to do everything we want.

I would think this is more useful framework rather than the others for now even I’ve just started to use it and there are just a small sample codes of its features. I guess it can be a killer web testing application. I tried it with my colleague and how about you?

Here is an example for you to try it:

Configuration file App.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii, Version=1.1.900.0, Culture=neutral, PublicKeyToken=4FD5F65BE123776C"/>
  </configSections>
  <WebAii.Settings
    annotateExecution="false"
    baseUrl="http://www.google.com/"
    clientReadyTimeout="50000"
    defaultBrowser="InternetExplorer"
    enableScriptLogging="false"
    enableUILessRequestViewing="false"
    executionDelay="0"
    executionTimeout="60000"
    localWebServer="None"
    logLocation="C:\WebAiiLog\"
    queryEventLogErrorsOnExit="false"
    simulatedMouseMoveSpeed="0.3"
    webAppPhysicalPath=""/>
</configuration>

Abstract class PageBase.cs

using ArtOfTest.WebAii.Core;
using NUnit.Framework;

namespace WebAiiUITest
{
    public abstract class PageBase
    {
        public readonly Manager manager = new Manager(true);
        protected Browser browser;
        protected Find find;

        [SetUp]
        public void SetUp()
        {
            manager.Start();
            manager.LaunchNewBrowser();

            browser = manager.ActiveBrowser;
            find = browser.Find;
            browser.NavigateTo("http://www.google.com/");
        }

        [TearDown]
        public void TearDown()
        {
            browser.Close();
        }
    }
}

Testing class KeywordSearch.cs

using ArtOfTest.WebAii.Controls.HtmlControls;
using NUnit.Framework;

namespace WebAiiUITest
{
    [TestFixture]
    public class KeywordSearch : PageBase
    {
        [Test]
        public void Should_keyword_search_found()
        {
            var searchText = "WowKhmer Tech";

            find.ById<htmlinputtext>("q").Value = searchText;
            find.ById<htmlinputsubmit>("btnG").Click();

            Assert.IsNotNull(find.ById<htmlanchor>(searchText));
        }
    }
}

This example will run with Internet Explorer browser. You can run with Firefox just change defaultBrowser=”Firefox” in App.config you can either write one line of code but I would like keep it easily in configuration file. It still doesn’t work if it opens with a new tab, from my experience unless you need to have a setting in browser. Click Tools -> Options -> Tabs -> select “a new window” option.

1 person has left a comment

Kieran - Gravatar

Kieran said:

I’ve been using webaii for 9 months on a AJAX heavy site and it works really, really well. It deals with all situation include dialogs and file uploads to name a couple of things. The art of test forums can answer most question quickly as well.

Overall a superb tool.

Posted on: October 15, 2008 at 4:25 pmQuote this Comment

Commentors on this Post-

Leave a Comment-

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs are automatically generated. Off-topic or inappropriate comments will be edited or deleted. Email addresses will never be published. Keep it PG-13 people!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

All fields marked with "*" are required.