WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

WinApp driver performance is too slow when loading a list of 500 items.

Open gouthamsam opened this issue 8 years ago • 12 comments

Hello, I have a scenario where 500 menu items were loaded in a screen. I want to scroll till the last menu item. WinApp driver is freezing and scrolling is not possible. I checked it with the developers, whether the issue is from their side. But it seems the issue is with the WinAppDriver, I opened the inspect tool and it doesn't respond. Do you think it's because of loading 500 UI items. Does Winapp driver while finding the element during automation use Inspect tool? If so, then there is an issue with WinApp driver performance.

gouthamsam avatar Mar 20 '18 11:03 gouthamsam

Hi @gouthamsam,

This is an interesting scenario that we have never tested yet. WinAppDriver does not use the inspect.exe tool as a dependency but it uses the same underlying UI Automation system API underneath. Traversing a complex UI tree with many elements like you described would probably takes time but it shouldn't freeze. Would you provide a simple sample app that you can share that reproduce this behavior?

timotiusmargo avatar Mar 20 '18 20:03 timotiusmargo

Can you also confirm if the issue persists on multiple PCs of varying specs?

hassanuz avatar Mar 20 '18 22:03 hassanuz

Hello @timotiusmargo , @hassanuz

Resources: System 1: WinApp Driver V1.0 Microsoft Windows 10 Enterprise Edition Version 1703. RAM: 64 GB. Core i7 processor

System2: WinApp Driver V1.0 Microsoft Windows 10 Enterprise Edition Version 1703. RAM: 32 GB. Core i7 processor

please download the Honeywell Movilizer app from the Microsoft store https://www.microsoft.com/store/apps/9NJ81PQ37CN4 Login details: Id : +999512 Password : 1

Test Scenario:

  1. Wait till the client synchronization is done. Note : Open Inspect.exe tool
  2. Click on Client Capabilities/Features/Customizing.
  3. Now click on TC167: Icon in front of option text.
  4. Click on 1 - Menu.
  5. Inspect tool doesn't respond.
  6. Manually I can open the Menu items and scroll till the last item.
  7. But when I automate, it doesn't work.
  8. WinApp Driver freezes.

Issue persists on different PCs. I can strongly say that tests are running very slow after sometime. While I am running a test suite of 250 tests, after some tests WinApp driver is slow. Attached please find the screenshots. Those tests which took 29 mins and 23 mins can be executed manually in 2-3 mins. It's just going back to the main test and again entering the test. WinApp driver performance is not that good as compared with Appium driver for Android and iOS.

capture1 capture12 capture21

Try to address this issue.

Regards, Sam capture

gouthamsam avatar Mar 22 '18 14:03 gouthamsam

any update on above issue? I am also facing this issue.

gclouds avatar Jul 24 '18 07:07 gclouds

The main culprit is when WinAppDriver or UiAutomationCOM hits the grid, it has to grab every cell handle which causes a delay based on the # of records. I'll see if I can create a good sample between them and let's find out what the WinAppDriver Team can tell us.

clintmasden avatar Feb 26 '19 18:02 clintmasden

Any workaround to make WinDriver initialization faster?

giri-ganesh avatar Sep 19 '19 12:09 giri-ganesh

Hi, I have the same problem. We are using latest release version 1.1. In case I open data grid in our application with more than 200 rows, it takes more than 2 minutes to find element on the bottom.

<window @name='DataGrid'>
     <controlPane>
         -------- here is 200 of data rows -------
     </controlPane>
     <titleBar @AutomationId='TitleBar'>
         ------- this bar I want to find -------
     </titleBar>
</window>

My locator: //*[@Name='DataGrid']//*[@AutomationId='TitleBar']. It takes more than 2 minutes. Maybe I can to speed it up with definition of element types, but anyway, this performance is horrible. In case there are no hundreds of elements, it goes fast, but still it's 10 times slower than WebDriver or AppiumDriver...

Update: I updated locators with specific element types: //Window[@Name='DataGrid']//TitleBar[@AutomationId='TitleBar']

There is no improvement in localization speed. :-(

hornyja4 avatar Dec 03 '19 12:12 hornyja4

Here is a sample between WinAppDriver and UiAutomationCOM on a .NET DataGridView with 1000 records.

WinAppDriver: Form Found: 0.102021~ Row 1000 Found: 26.9488513~

UiAutomationCOM: Form Found: 0.0540125~ Row 1000 Found: 2.8856485~

https://github.com/clintmasden/WinAppDriver/tree/investigate.GridPerformance

clintmasden avatar Dec 06 '19 04:12 clintmasden

Hi @timotiusmargo timotiusmargo has there been any progress on this? We are also facing similar issue on a windows application.

ashkaps avatar Feb 26 '20 13:02 ashkaps

Same issue... We definitely need a performance boost!

lsoft avatar Mar 05 '20 14:03 lsoft

Any update on this? I'm facing the same issue.

sujahid avatar Oct 13 '20 01:10 sujahid

I am facing the same issue While running a batch of even 30 test cases took more than 3 hours of time. Although interesting thing which I observed is that when I run it via maven bat file it is most of the times very sluggish but when I run the testng.xml directly "Run as TestNg" it improves the performance to an extent but not feasible all the times as I have multiple testng suite file. Its highly needed to improve the overall response time of Winappdriver.

anupekshajain avatar Feb 21 '23 12:02 anupekshajain