from ldtp import * from ldtputils import * import time try: x = execfile('launch_firefox.py') except LdtpExecutionError: log('Unable to launch firefox', 'error') log('Firefox Test Report', 'end') sys.exit(0) waittillguiexist('*-Minefield') try: selectmenuitem('*-Minefield','mnuFile;mnuNewWindow') time.sleep(5) except LdtpExecutionError: log('Oops! Unable to launch a new window', 'error') try: selectmenuitem('*-Minefield','mnuFile;mnuCloseWindow') time.sleep(5) except LdtpExecutionError: log('Unable to close the firefox window', 'error') try: selectmenuitem('*-Minefield','mnuFile;mnuNewTab') time.sleep(5) except LdtpExecutionError: log('Unable to open up a new tab in the firefox window', 'error') try: selectmenuitem('*-Minefield', 'mnuFile;mnuCloseTab') except LdtpExecutionError: log('Some error occured when closing a tab', 'error') try: selectmenuitem('*-Minefield', 'mnuFile;mnuOpenFile') except LdtpExecutionError: log('Unable to open up the dialog to select a new file to be opened', 'error')