Badgerati/Edison

Framework to support Browser testing

Badgerati opened this issue · 1 comments

using the InternetExplorer.Application COM Object in the SHDocVw.dll, allow the Edison.Framework to support browser testing.

Basically, this will be incorporating Monocle into Edison's main framework.

The browser testing will be basic and only support IE. This is mostly as stop-gap for users who only want basic browser testing functionality, and don't want to have to download a full library for it.

An example of a test is:

[Test]
public void TestNavigation()
{
    using (var browser = new Browser("<start_url>"))
    {                
        browser.Click(HtmlIdentifierType.ID, "about-page");
        AssertFactory.Instance.ExpectUrl(browser, "<start_url>/about");
    }
}

It's a bit similar to WatiN, but with just the basic features of:

  • Navigation
  • Setting element values
  • Retrieving element values
  • Click elements
  • Checking box
  • Get elements directly for more advanced usage

Each method sleep while the browser is busy for ease of use, and there are 3 helper asserts in the AssertFactory:

  • ExpectUrl
  • ExpectElement
  • ExpectValue

Each will attempt to check for the expectation for a number of seconds (configurable), and if not found will then fail the test.