Forum Discussion

ryan_bp's avatar
ryan_bp
New Contributor
9 years ago

Update expected object name during test

Hi,

 

I've got a data driven loop that navigates through all test accounts in a chrome browser, using a DB query that contains a list of urls that should be valid. - I have this working. 

What I'd like the test to do is to throw an error when a link isn't valid (ie. Page not found, Server Error in application etc...). 

I'd like to achieve this by verifying if an object exists on the screen, if it exists, url is valid, move to next record..if it doesn't exist throw an error, move to the next record and so on..

The problem that I'm having is updating the baseline object name that exists on the page, as that keeps changing for every account, so the tests fail all the time (the object name contains the account number). How can I update the expected baseline object name (with valid object names that exists in a DB query) and compare that against the object name currently on the screen?     

 

    

    • ryan_bp's avatar
      ryan_bp
      New Contributor

      Thank you for your reply. I achieved what I wanted by using wildcards in name mapping :)