All pastes #184232 Raw Edit

richee

public text v1 · immutable
#184232 ·published 2006-09-27 17:59 UTC
rendered paste body
from ldtp import *
from ldtputils import *

# Launching firefox with a profile name with the path specified in firefox3.0.xml file

from ldtp import *
from ldtputils import *

log('Firefox 3.0', 'teststart')
firefox3 = LdtpDataFileParser ()
try:
    firefox3.setfilename('firefox3.0.xml')
    launchPath = firefox3.gettagvalue('launchpath')
    profile2use = firefox3.gettagvalue('blank')

    firefoxPath = 'firefox'
    if launchPath != []:
        firefoxPath = launchPath[0] + '/' + firefoxPath
    if profile2use != []:
        firefoxPath = firefoxPath + ' -P ' + profile2use[0]
    launchapp(firefoxPath, 1)

except LdtpExecutionError, msg:
    log('Firefox 3.0 automation script execution: ' + str(msg), 'fail')
    log('Firefox 3.0', 'teststop')


<?xml version="1.0"?>
<data>
<launchpath>/home/ashish/firefox</launchpath>
<profile>LDTP</profile>
</data>