python – How can puwinauto and inspect.exe get control information from Google Chrome?

[ad_1]

Problem

I’m trying to get information about a control by mouse click. In Mozilla Firefox I get full information about the cotrol, but in Google Chrome and Yandex Browser I get only information about the window. When using inspect.exe, the cursor can’t point to the control either, but the tree structure has this control. Adding the flag –force-renderer-accessibility to hrome doesn’t change anything.

Short Example of Code to Demonstrate the Problem from ctypes.wintypes import tagPOINT import pywinauto x, y = 100, 100 # cursor coordinates elem = pywinauto.uia_defines.IUIA (). Iuia.ElementFromPoint (tagPOINT (x, y)) element = pywinauto .uia_element_info.UIAElementInfo (elem) wrapper = pywinauto.controls.uiawrapper.UIAWrapper (element) Expected Behavior

The wrapper variable stores the wrapper of the control, located at specific coordinates.

If you hover the cursor over a control in inspect.exe, the control is highlighted.

Actual Behavior

The wrapper variable stores the control’s wrapper, located at specific coordinates for Mozilla Firefox. The wrapper variable stores the dialog window control wrapper for Google Chrome and Yandex Browser.

If you put the cursor on the control in inspect.exe, the control is highlighted in Mozilla Firefox. If you hover your cursor over a control in inspect.exe, the dialog window in Google Chrome and Yandex Browser is highlighted.

Steps to Reproduce the Problem Open Google Chrome, Mozilla Firefox Open in browsers google.com Open inspect.exe, and place the cursor on the Google icon in browsers. Different areas will be highlighted and different data will be in inspect.exe in different browsers. Move the cursor around the screen and hover over the Google icon again several times. In this case, the behavior will be different. Specifications Pywinauto version: 0.6.8 Python version and bitness: 3.8.5 and 64 Platform and OS: Windows10

Sources

1/ https://Google.com/

2/ https://stackoverflow.com/questions/72475676/how-can-puwinauto-and-inspect-exe-get-control-information-from-google-chrome

The mention sources can contact us to remove/changing this article

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts