bharatraj shetty
bharatraj shetty

Reputation: 43

I am unable to click on checkbox using Pywinauto. The checkbox is seen under UISpy.exe but not when checked using print_control_identifiers()

I am unable to click on checkbox using Pywinauto.

the checkbox is seen when checked using UISpy.exe

check attached image uispy_screenshot

the checkbox is not seen when checked using print_control_identifiers()

appNewConnect.ApplicationView1.child_window(class_name="SysListView32", found_index=0).print_control_identifiers()

check attached image control_identifiers_screenshot

Upvotes: 1

Views: 87

Answers (1)

Vasily Ryabov
Vasily Ryabov

Reputation: 9971

IsOffscreen: "True" in UISpy means you need additional search criterion: visible_only=False in child_window parameters. Try this code:

appNewConnect.ApplicationView1.child_window(control_type="List", found_index=0).child_window(control_type="CheckBox", visible_only=False, found_index=0).draw_outline()

Maybe adding visible_only=False to parent specification also may help to show it in .print_control_identifiers() (a.k.a. .dump_tree()) output. This needs to be double checked though.

Upvotes: 0

Related Questions