Re: [gnome-desktop-testing] Accessibility on Gnome-Screenshot
- From: Ara Pulido <ara ubuntu com>
- To: Michael Fletcher <m fletcher theplanet ca>
- Cc: desktop-testing-list gnome org
- Subject: Re: [gnome-desktop-testing] Accessibility on Gnome-Screenshot
- Date: Fri, 14 Aug 2009 07:58:39 +0200
Michael Fletcher wrote:
1. How does the name of a widget in ldtp get determined? If this is
explained somewhere please point me in the right direction.
One trick that I use to find the LDTP name of a widget when I start
scripting is getting all the children of a window.
I wrote a small script (attached) and you can use it as:
$ python get_all_roles.py <window_name> <output_file>
That will print in the output file name all the children of the window,
with their role.
I hope it is useful.
Cheers,
Ara.
2. How is the label-for as it appears in accerciser determined? I
assumed it was in the GtkBuilder file.
I'm testing with Jaunty, ldtp 1.5.1 and the latest mago from bzr.
------------------------------------------------------------------------
_______________________________________________
http://live.gnome.org/DesktopTesting
desktop-testing-list mailing list
desktop-testing-list gnome org
http://mail.gnome.org/mailman/listinfo/desktop-testing-list
#!/usr/bin/python
from ldtp import *
from ooldtp import *
from optparse import OptionParser
#Defining the command line arguments
usage = '%prog window_name output_file'
parser = OptionParser(usage)
(options, args) = parser.parse_args ()
if len (args) != 2:
parser.error ('Incorrect number of arguments')
app = context(args[0])
output = open(args[1], "w")
for component in app.getobjectlist():
role = getobjectproperty(args[0], component, 'class')
component = component.encode("UTF-8")
output.write(str(component) + ", " + str(role) + "\n")
output.flush()
output.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]