3
__author__ = 'David Malcolm <dmalcolm@redhat.com>'
5
# Test AbiWord, converting a Word document to HTML, using the procedural API.
6
# Also shows how to write code that handles different versions of a package,
7
# querying the installed package version in a distribution-neutral fashion.
8
# FIXME: not yet finished
9
# FIXME: doesn't work yet. Tested with AbiWord 2.0.12 on FC3
11
from dogtail.procedural import *
12
from dogtail.utils import *
13
from dogtail.distro import *
14
from dogtail.version import Version
16
abiVersion = packageDb.getVersion('abiword')
18
# Set up appname based on version of abiword:
19
if abiVersion>=Version([2,3,0]):
20
appName = 'AbiWord-2.4'
24
run("abiword", appName=appName)
29
focus.application(appName) #FIXME: shouldn't 'run' automatically scope the app? this call seems to be needed
36
# On AbiWord 2.0.12 on FC3 this gives a GtkFileSelector dialog:
37
focus.dialog('Open File') # fails on FC3: the dialog has roleName="file chooser", rather than 'dialog'
39
focus.widget.object.text = "test-word-document.doc"