ClassFindClause
Represents an atomic search expression i.e foo=~bar
Definition
Namespace:ArtOfTest.Common
Assembly:ArtOfTest.WebAii.dll
Syntax:
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0")]
public abstract class FindClause
Inheritance: objectFindClause
Derived Classes:
Constructors
FindClause(string)
Create a new FindClause.
Declaration
public FindClause(string clause)
Parameters
clause
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
[DataMember(Name = "Clause")]
public string Clause { get; set; }
Property Value
CompareType
Gets the expression compare type.
Declaration
public FindCompareType CompareType { get; }
Property Value
IsHierarchical
Gets whether this search clause is relative to the root of the search.
Declaration
public bool IsHierarchical { get; set; }
Property Value
Remarks
FindExpression implementations set this. Does not need to be serialized.
Name
Gets the name part of the expression.
Priority
Gets the search priority of this clause. 0 is the highest. 10 lowest.
Declaration
public int Priority { get; set; }
Property Value
Remarks
FindExpression implementations set this. Does not need to be serialized.
Methods
ExtractValue(string, ITargetElement)
Given a specific search term, get the actual value from the passed in target element.
Declaration
public abstract string ExtractValue(string searchType, ITargetElement element)
Parameters
searchType
Search type as a string. (i.e. TagName/TextContent..etc)
element
The target element to use.
Returns
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
public static char GetSpecialCharForCompareType(FindCompareType compareType)
Parameters
compareType
The compare type to lookup.
Returns
The special compare type.
Match(ITargetElement)
Match this expression.
Declaration
public abstract bool Match(ITargetElement element)
Parameters
element
The element to match
Returns
True/False whether the clause matches this element.
Match(ITargetElement, ITargetElement)
Match this expression starting at a specific element
Declaration
public abstract bool Match(ITargetElement element, ITargetElement startElement)
Parameters
element
startElement
Returns
OnParsed()
Called once the expression is parsed. Extenders can override this method to allow for post processing after parsing.
Declaration
public abstract void OnParsed()
ToString()
Return the string representation of this expression.
Declaration
public override string ToString()
Returns
The string representation of this expression.
Overrides