Forum Discussion
HKosova
13 years agoSmartBear Alumni (Retired)
Hi Rajib,
The script seems to be correct. Without further seeing the test logs, test project and your application under test, my guess is that it's the Name Mapping issue.
Try inserting the RefreshMappingInfo method call before verifying the StaffLaunchWnd object and see if this helps:
If the issue also occurs when using RefreshMappingInfo, it's probably caused by non-unique identification properties of the StaffLaunchWnd object in Name Mapping that result in matching another object. In this case, you need to modify the Name Mapping criteria (for example, add other properties) to make them unique for this object.
By the way, you can shorten the script for entering the staffId and password values if you dynamically evaluate the appropriate button names instead of using the Select Case statement:
The script seems to be correct. Without further seeing the test logs, test project and your application under test, my guess is that it's the Name Mapping issue.
Try inserting the RefreshMappingInfo method call before verifying the StaffLaunchWnd object and see if this helps:
Aliases.EliteMCP.wndEliteMCP.StaffLaunchWnd.RefreshMappingInfo
'Verify the staff launch window
Set obj = Aliases.EliteMCP.wndEliteMCP.StaffLaunchWnd
...
If the issue also occurs when using RefreshMappingInfo, it's probably caused by non-unique identification properties of the StaffLaunchWnd object in Name Mapping that result in matching another object. In this case, you need to modify the Name Mapping criteria (for example, add other properties) to make them unique for this object.
By the way, you can shorten the script for entering the staffId and password values if you dynamically evaluate the appropriate button names instead of using the Select Case statement:
For cnt = 1 To Len(staffId)
x = Mid(staffId, cnt, 1)
Execute "staffPinWnd.btn" & x & ".ClickButton"
Next
...
For cnt = 1 To Len(password)
x = Mid(password, cnt, 1)
Execute "staffPinWnd.btn" & x & ".ClickButton"
Next