-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finding an element with an XPath locator is very slow #132
Comments
Some additional findings when using FLaUInspect (UIA3 mode) with the above app:
So, obviously it's possible to manipulate the app elements very quickly via the exposed automation. But using XPath locators is very slow ... |
It may be that not the X-Path is slow, but the resolving of the top level window to which the X-Path is resolved relatively. I myself have experienced that the If it is the X-Path, it may be sped up by avoiding the use of |
@aristotelos I was under the impression that all XPath like '//...' are relative to the present driver window ... In our implementation, the code is performing driver.SwitchTo().Window(handle)
Obviously we try to use 'AutomationId' is available. Unfortunately these are not available in many cases. |
@aristotelos
FlaUI.WebDriver Version: v0.3.1
We have a complex legacy Desktop application that exposes FrameworkType Win32 automation interface.
An example XPath like: //Tab[@name='customers']//Text[contains(@name,'Drag and drop field here')]
can take up to 45 seconds to locate the related element.
Note that even a full Xpath for the above element example takes 10 seconds to locate the element.
What can be done to speed up this mechanism?
Any suggestions for a locator strategy that could improve the situation?
The text was updated successfully, but these errors were encountered: