im currently using watir to automate a list of things on a project.

for each test i want the script to return pass or fail but because this test is testing a company software who's UI i cant modify im a bit stuck

they consistently use javascript alerts and popups to confirm and show result of an action

thus the way to know that a change was successful is contained in the popup and thus i am looking for a simple method using watir & ruby to read the text contents of these javascript popups

by evaluating this javascript popups contents i can check for expected messages to see if it passed or failed

can anyone suggest example or useful code