5
This is the "tsclient" module.
7
This module provides a wrapper for LDTP to make writing Tsclient tests easier.
12
from .main import Application
13
from ..gconfwrapper import GConf
14
from ..cmd import globals
18
gettext.install (True)
19
gettext.bindtextdomain (PACKAGE, globals.LOCALE_SHARE)
20
gettext.textdomain (PACKAGE)
21
t = gettext.translation(PACKAGE, globals.LOCALE_SHARE, fallback = True)
25
class Tsclient(Application):
27
tsclient manages the Tsclient application.
32
WINDOW = 'frmTerminalServerClient'
35
BTN_ABOUT = _('btnAbout')
36
BTN_CLOSE = _('btnClose')
37
BTN_CONNECT = _('btnConnect')
38
BTN_OPEN = _('btnOpen')
39
BTN_SAVEAS = _('btnSaveAs')
40
MNU_1024X768PIXELS = _('mnu1024x768pixels')
41
MNU_1152X864PIXELS = _('mnu1152x864pixels')
42
MNU_1280X960PIXELS = _('mnu1280x960pixels')
43
MNU_1400X1050PIXELS = _('mnu1400x1050pixels')
44
MNU_256COLORS = _('mnu256Colors')
45
MNU_640X480PIXELS = _('mnu640x480pixels')
46
MNU_800X600PIXELS = _('mnu800x600pixels')
47
MNU_HIGHCOLOR_15BIT_ = _('mnuHighColor*15bit*')
48
MNU_HIGHCOLOR_16BIT_ = _('mnuHighColor*16bit*')
50
MNU_INFULLSCREENMODEONLY = _('mnuInfullscreenmodeonly')
51
MNU_ONTHELOCALCOMPUTER = _('mnuOnthelocalcomputer')
52
MNU_ONTHEREMOTECOMPUTER = _('mnuOntheremotecomputer')
53
MNU_QUICKCONNECT = _('mnuQuickConnect')
55
MNU_RDPV5 = _('mnuRDPv5')
56
MNU_TRUECOLOR_24BIT_ = _('mnuTrueColor*24bit*')
58
MNU_XDMCP = _('mnuXDMCP')
62
TXT_CLIENTHOSTNAME = _('txtClientHostname')
63
TXT_COMPUTER = _('txtComputer')
64
TXT_DOMAIN = _('txtDomain')
65
TXT_PROTOCOLFILE = _('txtProtocolFile')
66
TXT_USERNAME = _('txtUserName')
69
def runAboutdialog(self):
71
This basic test simply verifies that the application launches
72
and that the UI reacts
73
The About dialog is the only menu that is always present in the UI
76
self.main_window.click(self.BTN_ABOUT)
78
# Wait for the dialog to open
79
# Name of about dialogs change with the app
82
while not ( timeout>0 and dlgAbout):
83
dlgs=[ w for w in ldtp.getwindowlist() if w.startswith('dlgAbout')]
90
raise AssertionError('About Dialog not found')
93
# Looking for a button to close the window
95
for btnClose in ('btnClose', 'btnOK', 'btnCancel'):
97
found = ldtp.getchild(dlgAbout, btnClose, 'push button')
105
ldtp.click(dlgAbout, btnClose)
108
self.main_window.click(self.BTN_CLOSE)
111
Application.__init__(self)
112
self.main_window = ooldtp.context(self.WINDOW)