Winium.Desktop
Winium.Desktop copied to clipboard
Winium is very slow
Winium is very slow while identifying elements
I am using Winium to automate legacy desktop application. But Winium is very slow while identifying elements in the application. Finding an element is taking almost 10 sec which eventually results slowness in execution
I am just using normal ways to point elements.(driver.findElement())
Is there any ways to overcome this?
In Winium.Desktop driver represents the whole desktop, not only your app under a test.
The find method uses depth-first search, meaning that if there are a lot of windows open on the desktop and the element you are looking for turns out to be in the last window, the search will have to go through all of the elements in all previous windows.
To make your search faster, please limit the scope. First, find the application window and save the reference to a variable. Then, do any future searches from that element, not from the desktop.
Something like that:
aut=driver.find_element_by_xpath("/*[@AutomationId='MyApplication']")
# do all following search starting at aut element
aut.find_element_by_xpath("//*[@ClassName='TextBox']")
aut.find_element _by_ text("some text")
...
Hi NickAb,
I have tried your suggested method. But still it is slow. Is there any other way like system configuration change which may boost the speed?
@NickAb Can you suggest some other methods for this issue? Still experiencing same issue
Hi NickAb,
I have tried your suggested method. But still it is slow. Is there any other way like system configuration change which may boost the speed?
While launching winium you would've used http://localhost:9999/
instead use http://127.0.0.1:9999/
@NickAb @PradheepRaaj