pything:python_uatomation:interacting_with_controls

This is an old revision of the document!


Finding specific windows and text boxes and interacting with them

Use the following to find all windows and controls within a given application.
You can use something like UISpy to help narrow down the panel or window you want to search in and then use it's title as part of your input.

specific_panel = main_window.child_window(title="pnlCallDetail")
specific_panel.print_control_identifiers()   

Find specific control that has the text you want… like in this case.
The good news is, control names don't tend to change when you search like this, but automation_ids and handles might change.
Easier to just call by control name.

 | ['Edit2', 'Existing IssueEdit']
 | child_window(title="WE ARE CLOSING OUR OWENSBORO STORE, NEEDED CARDPOINT TO CHANGE CC READER OVER, THEY SAY THEY CANNOT DO IT. NEED ASSISTANCE GETTING THIS FIXED TO USE CLOVER ON OUR SECOND TERMINAL.", class_name="TMemo")


Wow we can select and copy this text by doing the following:

main_window.child_window(title="pnlCallDetail").Edit2.select()

Now copy the text:
main_window.child_window(title="pnlCallDetail").Edit2.type_keys('^c')

Now you can paste in another typable field:

main_window.child_window(class_name="TfrmSupportCall").Edit4.type_keys('^v')