python:python_automation:interacting_with_controls

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
python:python_automation:interacting_with_controls [2024/08/25 21:34] – created jcoronapython:python_automation:interacting_with_controls [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== 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.  
- 
-<code python> 
-specific_panel = main_window.child_window(title="pnlCallDetail") 
-specific_panel.print_control_identifiers()    
-</code>  
-\\ 
-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: 
-<code python>  
-main_window.child_window(title="pnlCallDetail").Edit2.select() 
-</code>  
-\\ 
-Now copy the text:  
-<code python>  
-main_window.child_window(title="pnlCallDetail").Edit2.type_keys('^c') 
-</code>  
-\\ 
-Now you can paste in another typable field:  
- 
-<code python> 
-main_window.child_window(class_name="TfrmSupportCall").Edit4.type_keys('^v') 
-</code>