Given a FindParam this method returns true/false whether this FindParam matches the passed in
element.
Namespace:
ArtOfTest.WebAii.Controls
Assembly:
ArtOfTest.WebAii (in ArtOfTest.WebAii.dll) Version: 2018.1.116.0 (2018.1.116.0)
public static bool MatchControl(
Element element,
FindParam paramToMatch
)
Public Shared Function MatchControl (
element As Element,
paramToMatch As FindParam
) As Boolean
Parameters
- element
- Type: ArtOfTest.WebAii.ObjectModelElement
The element to match. - paramToMatch
- Type: ArtOfTest.WebAii.ObjectModelFindParam
The FindParam.
Return Value
Type:
BooleanTrue/False whether the FindParam matches.
For a FindParam to match an element, the following condition must be met:
1. The FindParam.TagName is set, needs to match the element's tagName.
2. If FindParam.Type=Content, then the content as described by FindParam needs to match.
3. The FindParam.Attributes and FindParam.PartialAttributes need to match if any are set.
4. If FindParam.Type=TagIndex/XPath or NodeIndexPath will throw an exception since they do
not apply in this scenario since they apply only when matching an element within a full
DOM hierarchy not an atomic element matching.
Reference