Object Repository Issues Between Environments

Hi,

My team has a website we host that has multiple environments: test, beta, dev, prod. We need to be able to test at will in any of these locations.

However, some objects are breaking because it doesn't recognize the same object on all the servers. for instance, when capturing the Welcome message, it is capturing 'Welcome John Smith'. If in another environment it is thens aying 'Welcome Jane Smith', it won't recognize it.

Any suggestions on how I could possibly get around this issue? I have to keep recapturing certain objects every time I need to run the test automation to keep the tests from breaking. Any suggestions would be helpful.

 

I have HP 12.53, the tests were all made in 12.00 and modified in 12.02 before I installed this version, this week.

  • hi, there

    Firstly you can try making those changing properties to use the regular expression. In your case, something like 'Welcome\s[A-Za-z] \s[A-Za-z] '.

    Also, you can maintain different sor files for different environments and load them during runtime. 

    Thanks.

    James

  • For the specific example, you should remove the property that has the specified text from mandatory list of properties that it checks to identify the object. You can use xpath or title or anything else that will help identifying this object, other than text, since this is dynamic depening upon the user who logs in.

    Open OR and change the identification properties. If you dont find anyother property , then you can use regular expression. 

    Example: Open OR and select the object that you are referring to. I guess its a webelement, on the right side you will see the properties that is being used to identify this object. If you see any property that has this "welcome..." text. remove that and add someother property that is unique.. it could be title, xpath.. 

    Test the OR against different environments. 

    Let us know if you have any questions.

    GoScriptLESS, Create tests in seconds using UFT View demo and other info at scriplessautomation.com