Forum Discussion

dpampalon's avatar
dpampalon
New Contributor
14 years ago

TC Confused when web environment changes

Hi all!



Hope someone can help me out as I am about to run out of hair to pull.



Here is my situation:



1. Captured a script using http://environment1/login.aspx. The test simply populate username and password

2. Made changes to add logic

3. Rerun that script on original environment (http://environment1/login.aspx) - PASS

4. Run the same script on another environment (http://environment2/login.aspx) running the very same code base



Problem:



When it reaches the thextbox to populate username, it is unable to find it and I evetually get the "Test object not found" dialog asking me to "remap" that object. I try to do so but when I click on Finish, I get the message "The parent object hierarchy of the selected object does not match the expected hierarchy.Please press re-map the object to reflect the change".



My question here is why is it that the script runs perfectly on the first environment and not on the second even if it is the exact same code base?



Hope to get some good reply because I am just about to tell my boss that automation for this project has NO return on investment and revert to manual testing or find another solution.



Regards

1 Reply

  • Hi,



    The URL changes, while you probably didn't change the recorded one in your original test. Go to the name mapping editor, find the page object (normally, it is the direct child of the browser) there and replace the variable URL part with '*'. The 'variable part' in your example is the number after 'environment'.



    Also, see this video which is about name mapping and dynamic web objects.