Forum Discussion
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()
Can you try below,
def FocusOnAddDependent(): obj = Aliases.Caesar.CSR_MAIN.MDIClient winobj = obj.Window("ThunderRT6FormDC", "MRMEMBMNT01 - Member Maintenance - Add Dependent") winobj.SetFocus()
- joseph_michaud8 years agoModerator
What does your namemap look like? And what are the mapping criteria for MRMEMBNT01? Is there another mapped object in the namemap similar to MRMEMBNT01 (perhaps MRMEMBNT01_2?) and, if so, what are *its* mapping criteria?
- 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()
- Hardy8 years agoOccasional Contributor
The MappedName of "Add Dependent" and "New Member" window both are "Aliases.Caesar.CSR_MAIN.MDIClient.MRMEMBMNT01", so when i playback the Add Dependent operation, it will always focus on "New Member" window and failure. Please refer to the screenshot for more details.
And if i use the Fullname property as Add Dependent operation's object name, it can playback the Add Dependent operation successfully, but each operation's response time is very long, each operation take about 12 sec. I have not found better way to resolve my question, can you help to check it. Thanks!
- shankar_r8 years agoCommunity Hero
Hi,
Again, You are mapped both windows as same Aliases.
You need map the both windows as separate Objects in Namemapping.
- Hardy8 years agoOccasional Contributor
I don't understand what you means, and how to map two window in different way.
And i use Object Spy to obtain Member Type field's properties of both two window, the MappedName property are same, the Fullname property are different, so i am using Fullname property as object name, but the response time is very long, do you know any other method to resolve this question. Pls refer to the attached screenshot for more details.
Related Content
- 2 years ago
Recent Discussions
- 12 hours ago
- 2 days ago