Forum Discussion

Leela1's avatar
Leela1
Occasional Contributor
4 years ago
Solved

Object NameMappling

Same application is user for different banks My script got recorded as browser.textbox,username in JavaScript and I see the NameMapping has 'userinput' value as idstr, When I try to execute my scr...
  • hkim5's avatar
    4 years ago

    Im assuming that when you say same application, but for different banks, that this is sort of a web application, where everything is the same except for pretty much the banking application.

     

    At the top level, you'd have  browser object, and then the top level window. these windows are usually identified by the object type and the url. This means that you'd have two different objects at this level where you'd have aliases.browser.bank1TopPage that is being identified by object type browser window and the url (www.bank1.com) and then a second object aliases.browser.bank2TopPage that is being identified by the same object type but with a differnt url (www.bank2.com). This means that the subsequent objects on either page are unique to each other since they are childrens of two unique objects. So when you access browser.textbox.username for bank2 application, you are only accessing that username panel. The same "browser.textbox.username" will not work for bank1 application.

    I'm willing to bet that if you look at your script (since im guessing you recorded) you would have somewhere before that first line where you access browser.text.username, you see a line like

    browser = Aliases.browser.pageBank2.usernamePanel

    which would mean that any of the following references to browser.text.username would only be referencing that bank2 textbox object. 

    If you provide more screenshots of your script, and the name mapping file that shows the object identification properties of both username panels for each of the application (for different banks), then we could help you better. But chances are, while you are looking for this info to provide the information, you'd probably notice that they are different objects too.

    -----

    but to solve your problem, you could probably do conditional name mapping at the top level to identify both of the banks' application at the top level to use the same alias for both of the username panels (if everything about the application is the same for both of the banks)