LDTP  3.5.0
 All Pages
launchapp

Syntax

launchapp('<application binary name>'[, argument] [,delay = 5][, env = 1])

second and third arguments are optional. environment default argument is 1. So the GTK_MODULES and GNOME_ACCESSIBILITY will be set and added to the enivronment variable.

Delay is wait time(in seconds) after launching the application

NOTE: Incase of remote session, the command line arguments should be part of application name

Description

Application name specified as an argument will be launched.

Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtp/__init__.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py

Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Core.cs

Example

Launch file-roller application.

from ldtp import *

launchapp('file-roller')

launchapp('gaim', env = 1) # Invoke the application after setting environment variables

launchapp('file-roller', ['/home/ldtp/test.tar.gz'], env = 0) # Invoke the application with optional command line argument

Author
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com
Shankar Ganesh shaga.nosp@m.n.gl.nosp@m.are@g.nosp@m.mail.nosp@m..com


Linux Desktop Testing Project