UITechnologyManager.Search(Object, IUITechnologyElement, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Searches for an element in the parent element that matches the condition of the provided query ID cookie.
public:
abstract cli::array <System::Object ^> ^ Search(System::Object ^ parsedQueryIdCookie, Microsoft::VisualStudio::TestTools::UITest::Extension::IUITechnologyElement ^ parentElement, int maxDepth);
public abstract object[] Search (object parsedQueryIdCookie, Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement parentElement, int maxDepth);
abstract member Search : obj * Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement * int -> obj[]
Public MustOverride Function Search (parsedQueryIdCookie As Object, parentElement As IUITechnologyElement, maxDepth As Integer) As Object()
Parameters
- parsedQueryIdCookie
- Object
A query cookie that was previously parsed by using the ParseQueryId(String, Object) method.
- parentElement
- IUITechnologyElement
An IUITechnologyElement object.
- maxDepth
- Int32
An int that indicates how deep into the control hierarchy to search.
Returns
An array of elements that match the query, or null if no elements are found.
Implements
Exceptions
This implementation does not support this method.To process this exception, the test framework uses the GetChildren(IUITechnologyElement, Object) method to traverse the hierarchy, and uses the MatchElement(IUITechnologyElement, Object, Boolean) method on each element to determine whether it matches the query.