You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An XPath query should consider the root of the query in the results. For example, go to http://xpather.com/ and enter //app: the root element is returned. This behavior is correct in e.g. WinAppDriver.
Alternatively, run the following code:
vardoc= XDocument.Parse("<root><child>text</child></root>");varnode= doc.Root!.XPathSelectElement("//root");// root is found
The text was updated successfully, but these errors were encountered:
Describe the bug
XPath queries such as
AutomationElement.FindFirstByXPath
do not consider the root element for queries so queries such as//Window
return no elements.Code snippets
Additional context
An XPath query should consider the root of the query in the results. For example, go to http://xpather.com/ and enter
//app
: the root element is returned. This behavior is correct in e.g. WinAppDriver.Alternatively, run the following code:
The text was updated successfully, but these errors were encountered: