ClassBaseTest
Base test class for all WebAii unit/coded tests.
Definition
Namespace:ArtOfTest.WebAii.TestTemplates
Assembly:ArtOfTest.WebAii.dll
Syntax:
public abstract class BaseTest : IDisposable
Inheritance: objectBaseTest
Implements:
Constructors
BaseTest()
Declaration
protected BaseTest()
Properties
Actions
Gets the actions object associated with the ActiveBrowser.
ActiveBrowser
Gets the ActiveBrowser object. (The last browser launched).
Desktop
Gets the Desktop object from the Manager.
Elements
Gets the Elements finder to be used to access elements defined by FindAttribute on the test method or class.
Find
Gets the Find object associated with the ActiveBrowser.
Log
Gets the Log object associated with the Manager.
Manager
Gets the Manager object.
Methods
Dispose()
Dispose of this test and all of its resources. This method simply calls the CleanUp() method.
Declaration
public virtual void Dispose()
Implements
GetSettings()
This method reads the settings object from the App.Config file and returns a Settings object.
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="WebAii.Settings" type="ArtOfTest.WebAii.Core.SettingsConfigSectionHandler,ArtOfTest.WebAii, Version=x.x.xxx.x, Culture=neutral, PublicKeyToken=4FD5F65BE123776C"/> </configSections>
<WebAii.Settings defaultBrowser="InternetExplorer" logLocation="D:\Log" executionTimeout="60000" clientReadyTimeout="50000" /> </configuration>
Declaration
public static Settings GetSettings()
Returns
The settings object read from App.Config.
Remarks
If you call this method and there are not settings present in the App.Config, then the method will create an empty Setting object and reset it to the system default settings.
Also note that all Initialize() methods will call this method to attempt to load the settings.
Initialize(Settings)
Initialize this test case object.
Declaration
public void Initialize(Settings settings)
Parameters
settings
The settings to use for initialization.
Initialize(Settings, TestContextWriteLine)
Initialize this test case object.
Declaration
public void Initialize(Settings settings, TestContextWriteLine vsWriteLineDelegate)
Parameters
settings
The settings to use for initialization.
vsWriteLineDelegate
A write line delegate to call when logging from Log.WriteLine.
Initialize(TestContextWriteLine)
Initialize this test case object.
Declaration
public void Initialize(TestContextWriteLine vsWriteLineDelegate)
Parameters
vsWriteLineDelegate
A write line delegate to call when logging from Log.WriteLine.
Initialize(bool)
Initialize this test case object.
Declaration
public void Initialize(bool recycleBrowser)
Parameters
recycleBrowser
True to run all tests in the same browser instance. Make sure that the test fixture tear-down calls the static ShutDown method of this class when using this setting.
Initialize(bool, TestContextWriteLine)
Initialize this test case object.
Declaration
public void Initialize(bool recycleBrowser, TestContextWriteLine vsWriteLineDelegate)
Parameters
recycleBrowser
True to run all tests in the same browser instance. Make sure that the test fixture tear-down calls the static ShutDown method of this class when using this setting.
vsWriteLineDelegate
A write line delegate to call when logging from Log.WriteLine.
Initialize(bool, string, TestContextWriteLine)
Initialize this test case object.
Declaration
public void Initialize(bool recycleBrowser, string logLocation, TestContextWriteLine vsWriteLineDelegate)
Parameters
recycleBrowser
True to run all tests in the same browser instance. Make sure that the test fixture tear-down calls the static ShutDown method of this class when using this setting.
logLocation
The log location where to do the logging.
vsWriteLineDelegate
A write line delegate to call when logging from Log.WriteLine.
Initialize(string)
Initialize this test case object.
Declaration
public void Initialize(string logLocation)
Parameters
logLocation
The log location where to do the logging.
Initialize(string, TestContextWriteLine)
Initialize this test case object.
Declaration
public void Initialize(string logLocation, TestContextWriteLine vsWriteLineDelegate)
Parameters
logLocation
The log location where to do the logging.
vsWriteLineDelegate
A write line delegate to call when logging from Log.WriteLine.
SetTestMethod(object, string)
Set the TestMethod executing so that WebAii can extract its attributes.
ShutDown()
Shut down all instances if recycle brower is set.
Declaration
public static void ShutDown()