1

I want to automate an application via Pywinauto on my laptop but all the elements are not seen.

“Inspect.exe” cannot find some elements of my application on my laptop whilst it finds them on other computers.

For example on my laptop “Inspect.exe” cannot show highlight rectangle of the leaves of a treeview whilst it can on other computers.

How can i fix it on my laptop? Is it a setting of the Os (Windows 7) or a setting of "inspect.exe"?

David Pratmarty
  • 596
  • 1
  • 4
  • 19
  • flagging this question as off-topic since it is about computer software instead of programming – absoluteAquarian Sep 26 '18 at 16:46
  • It might be different Qt runtime or different version of `UIAutomationCore.dll`. – Vasily Ryabov Sep 26 '18 at 20:31
  • Qt runtime is more relevant, because it's an app engine responsibility to support UI Automation properties. One more assumption: it could be different `Inspect.exe` settings like "Show content elements" or "Show control elements only". On my Windows 10 `Inspect.exe` hangs in 1-2 sec. after starting. :) So I can't check it right now. Are you using `Inspect.exe` from actual Windows SDK for your laptop or copied `Inspect.exe` from another PC or downloaded it from GitHub? – Vasily Ryabov Sep 26 '18 at 20:36
  • Well, `Inspect.exe` from Windows 10 SDK is working for me, while Windows 8.1 SDK version was hang (it was left from upgrade to Win10 a while ago). But I don't see much difference between menu items "Options-> Raw View" and "Options -> Control View". – Vasily Ryabov Sep 26 '18 at 20:42
  • @Vasily Ryabov Thank you very much for your help. I tried the same version of inspect.exe from windows 7 on my laptop and on other computer, I tried a copied version on the the laptop, I tried QT_USE_NATIVE_WINDOWS=1 in the environment but I don't see any difference on the laptop some elements are still not found. Furthermore I have the same behavior with Pywinauto, some elements are still not found on the laptop. I don't know where to find UIAutomationCore.dll to check the version – David Pratmarty Sep 28 '18 at 07:12
  • Probably in C:\Windows\System32 – Vasily Ryabov Sep 28 '18 at 18:34
  • I have checked UIAutomationCore.dll and it's the same version on the laptop where I cannot see all the elements and another PC where I can see all the elements. Now,I don't know where to search to fix it. – David Pratmarty Oct 03 '18 at 14:44

1 Answers1

3

I finally managed to have all the elements of my application detected (by Pywinauto and inspect.exe) on my laptop. The problem was, as Vasily Ryabov suggested to me, the Qt runtime: the "plugins\accessible" folder was not in the QT folder.

Thank you again for your help Vasily Ryabov.

Here is a link explaining how QT plugins work: https://het.as.utexas.edu/HET/Software/html/deployment-plugins.html

David Pratmarty
  • 596
  • 1
  • 4
  • 19
  • Can you elaborate more how this issue got solved for you? – Communisty Sep 07 '22 at 08:44
  • The GUI of the application I wanted to automate with Pywinauto was developed with QT. I had to find out where the QT Runtime used by the application was in order to verify that the "plugins\accessible" foder was delivered. I added a link explaining how QT plugins work in my answer. – David Pratmarty Sep 08 '22 at 09:38
  • I have similar issue. I want to automate UaExpert (https://www.unified-automation.com/downloads/opc-ua-clients.html). UaExpert is also a QT project. In this tool. I can't access all the UI elements via inspect.exe. Is there any workaround to it? – Sachin Nov 18 '22 at 11:24