Class
BaseWebAiiTest

Base execution class for a WebAii testcase code behind class.

Definition

Namespace:ArtOfTest.WebAii.Design

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public abstract class BaseWebAiiTest

Inheritance: objectBaseWebAiiTest

Constructors

BaseWebAiiTest()

Create a new webaii test

Declaration

cs-api-definition
public BaseWebAiiTest()

Properties

Actions

Gets the Action object of the current test.

Declaration

cs-api-definition
public Actions Actions { get; }

Property Value

Actions

ActiveApplication

Gets the ActiveWpfApplication.

Declaration

cs-api-definition
public WpfApplication ActiveApplication { get; }

Property Value

WpfApplication

ActiveBrowser

Gets the ActiveBrowser of current test.

Declaration

cs-api-definition
public Browser ActiveBrowser { get; }

Property Value

Browser

CodedTestResult

Declaration

cs-api-definition
public TestResult CodedTestResult { get; }

Property Value

TestResult

Data

Gets the test data this test is executing against.

Declaration

cs-api-definition
public BaseWebAiiTest.TestData Data { get; }

Property Value

BaseWebAiiTest.TestData

ExecutionContext

Gets the execution context of this testcase which contains information about current test being executed, the step and data (if test is data driven).

Declaration

cs-api-definition
public ExecutionContext ExecutionContext { get; }

Property Value

ExecutionContext

Find

Gets the Find object of the current test.

Declaration

cs-api-definition
public Find Find { get; }

Property Value

Find

Log

The current test log.

Declaration

cs-api-definition
public Log Log { get; }

Property Value

Log

Manager

Gets the runtime Manager object.

Declaration

cs-api-definition
public Manager Manager { get; }

Property Value

Manager

Wait

Gets the wait object for sync operations.

Declaration

cs-api-definition
public WaitSync Wait { get; }

Property Value

WaitSync

Methods

CleanUp()

Perform any test clean-up. You can override this method to perform your own clean up.

Declaration

cs-api-definition
public virtual void CleanUp()

ExecuteApiTest(string, IList<KeyValuePair<string, string>>)

Execute a specific API test case

Declaration

cs-api-definition
public void ExecuteApiTest(string relativeTestPath, IList<KeyValuePair<string, string>> variables = null)

Parameters

relativeTestPath

string

The relative path to the API test to execute.

variables

IList<KeyValuePair<string, string>>

Optional: varibles to be passed as arguments to the test execution.

ExecuteTest(string)

Execute a specific test case within the current execution context

Declaration

cs-api-definition
public void ExecuteTest(string relativeTestPath)

Parameters

relativeTestPath

string

The relative path to the test to execute.

GetExtractedValue(string)

Return the extracted value of a variable. All extract steps persist their values in a local store that is accessible by this method.

Declaration

cs-api-definition
public object GetExtractedValue(string dataBindVariableName)

Parameters

dataBindVariableName

string

The DataBindVariableName set by the extract step that you wish to access the value for.

Returns

object

The value of the extraction.

OnAfterTestCompleted(TestResult)

Override this method to get notification right after the test is done execution

Declaration

cs-api-definition
public virtual void OnAfterTestCompleted(TestResult result)

Parameters

result

TestResult

The result of this test's execution

OnBeforeTestStarted(BeforeTestStartedArgs)

Override this method to get notification right before the test is about to get executed.

Declaration

cs-api-definition
public virtual void OnBeforeTestStarted(BeforeTestStartedArgs args)

Parameters

args

BeforeTestStartedArgs

The args.

SetExtractedValue(string, object)

Sets an extracted variable directly with a value.

Declaration

cs-api-definition
public void SetExtractedValue(string dataBindVariableName, object value)

Parameters

dataBindVariableName

string

The variable name to set.

value

object

The value to set it to.

Remarks

If the variable already exists, it will override its value, else will add the variable and set its value.