from ldtp import * from ldtputils import * import time try: x = execfile('launch_firefox.py') print 'THe value of X is', x except LdtpExecutionError: log('Unable to launch firefox', 'error') log('Firefox Test Report', 'end') sys.exit(0) print 'This is the print statement before sleep 15' time.sleep(15) try: selectmenuitem('*-Minefield','mnuFile;mnuNewWindow') except LdtpExecutionError: log('Oops! Unable to launch a new window', 'error') try: selectmenuitem('*-Minefield','mnuFile;mnuClose') except LdtpExecutionError: log('Unable to close the firefox window', 'error') try: selectmenuitem('*-Minefield','mnuFile;mnuNewTab') except LdtpExecutionError: log('Unable to open up a new tab in the firefox window', 'error') print 'This is the print statement at the end of the script'