Same application is user for different banks
and I see the NameMapping has 'userinput' value as idstr,
When I try to execute my script for bank1 it got executed
but when I tried to execute it for bank2 it failed saying
Cannot find browser.textbox but when I see the namemapping for browser.textbox object on the the bank2 website is also same exact value 'userinput' (ie idstr = userinput)
Wondering why my script is not running for bank2 (the site is exactly the same for both banks except names of banks are different)
Solved! Go to Solution.
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)
Justin, that you for contributing to this thread!
@Leela1 Were you able to resolve this? If not, do share more details and the Community will do its best to keep helping!
Community and Education Specialist