Forum Discussion
This looks, both widows have their unique property. But you have mapped both windows as same window.
Have you mapped both objects with below properties,
WndCaption
WndClass
I use below method to SetFocus, but it will prompt the message: cannot obtain the window with the window class "ThunderRT6FormDC", window caption "MRMEMBMNT01 - Member Maintenance - Add Dependent".
def FocusOnAddDependent():
obj = Aliases.Caesar.CSR_MAIN.MDIClient.MRMEMBMNT01
winobj = obj.Window("ThunderRT6FormDC", "MRMEMBMNT01 - Member Maintenance - Add Dependent")
winobj.SetFocus()
- shankar_r8 years agoCommunity Hero
Can you try below,
def FocusOnAddDependent(): obj = Aliases.Caesar.CSR_MAIN.MDIClient winobj = obj.Window("ThunderRT6FormDC", "MRMEMBMNT01 - Member Maintenance - Add Dependent") winobj.SetFocus()
- Hardy8 years agoOccasional Contributor
Still cannot work, it will prompt the message "Python runtime error" and additional info "Runtime error Member not found".
- shankar_r8 years agoCommunity Hero
I'm not a python script-er,
Aliases.Caesar.CSR_MAIN.MDIClient.MRMEMBMNT01 this is your expected object to click, But you are trying to find the same window again thats you getting error.
Aliases.Caesar.CSR_MAIN.MDIClient.MRMEMBMNT01.SetFocus()
Related Content
- 2 years ago