5
This is the "gnome_nettool" module.
7
This module provides a wrapper for LDTP to make writing Gnome_nettool 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 Gnome_nettool(Application):
27
gnome_nettool manages the Gnome_nettool application.
30
LAUNCHER = 'gnome-nettool'
32
WINDOW = 'frmDevices*NetworkTools'
34
BTN_CONFIGURE = _('btnConfigure')
35
BTN_FINGER = _('btnFinger')
36
BTN_LOOKUP = _('btnLookup')
37
BTN_NETSTAT = _('btnNetstat')
38
BTN_PING = _('btnPing')
39
BTN_SCAN = _('btnScan')
40
BTN_TRACE = _('btnTrace')
41
BTN_WHOIS = _('btnWhois')
42
MNU_ABOUT = _('mnuAbout')
43
MNU_ANY_ALLINFORMATION = _('mnuAny*AllInformation')
44
MNU_CPU_OSTYPE = _('mnuCPU*OSType')
45
MNU_CANONICALNAME = _('mnuCanonicalName')
46
MNU_CLEARHISTORY = _('mnuClearHistory')
47
MNU_COPYASTEXTREPORT = _('mnuCopyastextreport')
48
MNU_DEFAULTINFORMATION = _('mnuDefaultInformation')
49
MNU_EMPTY = _('mnuEmpty')
50
MNU_EMPTY1 = _('mnuEmpty1')
51
MNU_EMPTY2 = _('mnuEmpty2')
52
MNU_ETHERNETINTERFACE_ETH0_ = _('mnuEthernetInterface*eth0*')
53
MNU_GETHELPONLINE = _('mnuGetHelpOnline')
54
MNU_HELP1 = _('mnuHelp1')
55
MNU_HOSTNAMEFORADDRESS = _('mnuHostnameforAddress')
56
MNU_INTERNETADDRESS = _('mnuInternetAddress')
57
MNU_LOOPBACKINTERFACE_LO_ = _('mnuLoopbackInterface*lo*')
58
MNU_MAILBOXEXCHANGE = _('mnuMailboxExchange')
59
MNU_MAILBOXINFORMATION = _('mnuMailboxInformation')
60
MNU_NAMESERVER = _('mnuNameServer')
61
MNU_QUIT = _('mnuQuit')
62
MNU_REPORTAPROBLEM = _('mnuReportaProblem')
63
MNU_START_OF_AUTHORITY = _('mnuStart*of*authority')
64
MNU_TEXTINFORMATION = _('mnuTextInformation')
65
MNU_TRANSLATETHISAPPLICATION = _('mnuTranslateThisApplication')
66
MNU_WELLKNOWNSERVICES = _('mnuWellKnownServices')
67
TXT_FINGEROUTPUT = _('txtFingeroutput')
68
TXT_WHOISOUTPUT = _('txtWhoisoutput')
71
def runAboutdialog(self):
73
This basic test simply verifies that the application launches
74
and that the UI reacts
75
The About dialog is the only menu that is always present in the UI
78
self.main_window.click(self.MNU_ABOUT)
80
# Wait for the dialog to open
81
# Name of about dialogs change with the app
84
while not ( timeout>0 and dlgAbout):
85
dlgs=[ w for w in ldtp.getwindowlist() if w.startswith('dlgAbout')]
92
raise AssertionError('About Dialog not found')
95
# Looking for a button to close the window
97
for btnClose in ('btnClose', 'btnOK', 'btnCancel'):
99
found = ldtp.getchild(dlgAbout, btnClose, 'push button')
107
ldtp.click(dlgAbout, btnClose)
111
Application.__init__(self)
112
self.main_window = ooldtp.context(self.WINDOW)