Forum Discussion

rwestbury's avatar
rwestbury
Contributor
12 years ago

TC9 bugs when recording and expecting Mapped Names to be used

Hi all,



I have a scenario where I have several buttons that are identical in the application. Only 1 can be visible on the screen at a time though and I am only interested in the one that's currently visible on the screen. If I record myself clicking on the button, then review the script, it uses the mapped name as expected (Aliases.Main.ButtonA). If I play the script back, TC can't click it until it's active. This happens probably because TC finds one of the identical but invisible buttons and therefore can't click it. The solution is to add the "VisibleOnScreen" = True property to the name mapping definition for this control. However after adding that and then recording myself clicking the button, it no longer uses the mapped name. It instead uses Aliases.Main.SubmitButton(0)).



Are there any known solutions to this problem?



Thanks,



Robert

1 Reply

  • Anonymous's avatar
    Anonymous

    Hi Robert,



    Try refreshing the name mapping tree before accessing the object:



    Aliases.Main.RefreshMappingInfo()



    More info you can find here.