Class
FindClause

Represents an atomic search expression i.e foo=~bar

Definition

Namespace:ArtOfTest.Common

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0")]
public abstract class FindClause

Inheritance: objectFindClause

Derived Classes: DummyFindClauseHtmlFindClauseDesktopFindClauseXamlFindClause

Constructors

FindClause()

Create a new Search expression.

Declaration

cs-api-definition
public FindClause()

FindClause(string)

Create a new FindClause.

Declaration

cs-api-definition
public FindClause(string clause)

Parameters

clause

string

A clause expression. (i.e. foo=bar)

Properties

Clause

Gets or sets the search expression. On setting the value, the expression will be parsed.

Declaration

cs-api-definition
[DataMember(Name = "Clause")]
public string Clause { get; set; }

Property Value

string

CompareType

Gets the expression compare type.

Declaration

cs-api-definition
public FindCompareType CompareType { get; }

Property Value

FindCompareType

IsHierarchical

Gets whether this search clause is relative to the root of the search.

Declaration

cs-api-definition
public bool IsHierarchical { get; set; }

Property Value

bool

Remarks

FindExpression implementations set this. Does not need to be serialized.

Name

Gets the name part of the expression.

Declaration

cs-api-definition
public string Name { get; }

Property Value

string

Priority

Gets the search priority of this clause. 0 is the highest. 10 lowest.

Declaration

cs-api-definition
public int Priority { get; set; }

Property Value

int

Remarks

FindExpression implementations set this. Does not need to be serialized.

Value

Gets the value part of the expression.

Declaration

cs-api-definition
public string Value { get; }

Property Value

string

Methods

ExtractValue(string, ITargetElement)

Given a specific search term, get the actual value from the passed in target element.

Declaration

cs-api-definition
public abstract string ExtractValue(string searchType, ITargetElement element)

Parameters

searchType

string

Search type as a string. (i.e. TagName/TextContent..etc)

element

ITargetElement

The target element to use.

Returns

string

The actual value of that search term.

GetSpecialCharForCompareType(FindCompareType)

Does a reverse look up and returns the special character for a certain compare type.

Declaration

cs-api-definition
public static char GetSpecialCharForCompareType(FindCompareType compareType)

Parameters

compareType

FindCompareType

The compare type to lookup.

Returns

char

The special compare type.

Match(ITargetElement)

Match this expression.

Declaration

cs-api-definition
public abstract bool Match(ITargetElement element)

Parameters

element

ITargetElement

The element to match

Returns

bool

True/False whether the clause matches this element.

Match(ITargetElement, ITargetElement)

Match this expression starting at a specific element

Declaration

cs-api-definition
public abstract bool Match(ITargetElement element, ITargetElement startElement)

Parameters

element

ITargetElement

startElement

ITargetElement

Returns

bool

OnParsed()

Called once the expression is parsed. Extenders can override this method to allow for post processing after parsing.

Declaration

cs-api-definition
public abstract void OnParsed()

ToString()

Return the string representation of this expression.

Declaration

cs-api-definition
public override string ToString()

Returns

string

The string representation of this expression.

Overrides object.ToString()