from ldtp import *
from ldtputils import *
import time
try:
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;mnuNewTab')
time.sleep(5)
except LdtpExecutionError:
log('Oops! Unable to open up tabs in firefox')
try:
selectmenuitem('*-Minefield', 'mnuFile;mnuOpenFile')
time.sleep(3)
selectrow('dlgOpenFile', 'tblFiles', 'test.html')
click('dlgOpenFile', 'btnOpen')
except LdtpExecutionError:
log('Unable to open up the dialog to select a new file to be opened', 'error')
try:
time.sleep(5)
selectmenuitem('*-Minefield', 'mnuFile;mnuClose')
except LdtpExecutionError:
log('Unable to close the existing firefox windows')