diff options
author | dobey <dobey> | 2006-11-09 20:07:18 +0000 |
---|---|---|
committer | dobey <dobey> | 2006-11-09 20:07:18 +0000 |
commit | 5784ef52dcccd778a893aa2f85ab79ed1545b3a3 (patch) | |
tree | 7a2a819f413b059f9b91defd4f6b75eca25f06e7 | |
parent | e02c5f472e9fa80560977d400b34046ab9289151 (diff) |
2006-11-09 Rodney Dawes <dobey@novell.com>
* python/A11yTestUtils.py (a11y_find_panel_with_applet): Add a new
method to search for a specific applet in all available panels, this
probably breaks for multiple applets of the same type, but works great
for single applet instances
* scripts/applet-show-desktop.py:
* scripts/applet-volume-control.py:
Add two new scripts to attempt to poke at a couple applets
* scripts/gnome-panel.py: Scan all the panels that might exist
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | python/A11yTestUtils.py | 27 | ||||
-rwxr-xr-x | scripts/applet-show-desktop.py | 20 | ||||
-rwxr-xr-x | scripts/applet-volume-control.py | 21 | ||||
-rwxr-xr-x | scripts/gnome-panel.py | 22 |
5 files changed, 100 insertions, 3 deletions
@@ -1,3 +1,16 @@ +2006-11-09 Rodney Dawes <dobey@novell.com> + + * python/A11yTestUtils.py (a11y_find_panel_with_applet): Add a new + method to search for a specific applet in all available panels, this + probably breaks for multiple applets of the same type, but works great + for single applet instances + + * scripts/applet-show-desktop.py: + * scripts/applet-volume-control.py: + Add two new scripts to attempt to poke at a couple applets + + * scripts/gnome-panel.py: Scan all the panels that might exist + 2006-10-30 Rodney Dawes <dobey@novell.com> * scripts/Makefile.am: Add gnome-main-menu.py diff --git a/python/A11yTestUtils.py b/python/A11yTestUtils.py index 2e81b27..d282f88 100644 --- a/python/A11yTestUtils.py +++ b/python/A11yTestUtils.py @@ -102,6 +102,33 @@ def a11y_scan_window (windowName): f.write ('</tr>\n') f.write ('</table>\n') +def a11y_find_panel_with_applet (appletName): + panel_titles = [ + 'frmBottomExpandedEdgePanel', + 'frmBottomEdgePanel', + 'frmBottomCenteredPanel', + 'frmRightExpandedEdgePanel', + 'frmRightEdgePanel', + 'frmRightCenteredPanel', + 'frmTopExpandedEdgePanel', + 'frmTopEdgePanel', + 'frmTopCenteredPanel', + 'frmLeftExpandedEdgePanel', + 'frmLeftEdgePanel', + 'frmLeftCenteredPanel' + ] + + for panel_title in panel_titles: + if (guiexist (panel_title)): + if (objectexist (panel_title, appletName)): + return panel_title + else: + continue + else: + continue + + return None + def a11y_test_init (programName, argumentList = '', noLaunch = 0): global f ldtp.setlocale ('en_US.UTF-8') diff --git a/scripts/applet-show-desktop.py b/scripts/applet-show-desktop.py new file mode 100755 index 0000000..585bd4a --- /dev/null +++ b/scripts/applet-show-desktop.py @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import string, sys, os +from ldtp import * +from ldtputils import * +from A11yTestUtils import * + +program_name = 'applet-show-desktop' +applet_title = 'Show Desktop Button' + +a11y_test_init (program_name, None, 1) + +window_title = a11y_find_panel_with_applet (applet_title) + +if (window_title != None): + print applet_title + " found on " + window_title +else: + print "No panel found with " + applet_title + +a11y_test_shutdown () diff --git a/scripts/applet-volume-control.py b/scripts/applet-volume-control.py new file mode 100755 index 0000000..fdec3d9 --- /dev/null +++ b/scripts/applet-volume-control.py @@ -0,0 +1,21 @@ +#!/usr/bin/python + +import string, sys, os +from ldtp import * +from ldtputils import * +from A11yTestUtils import * + +program_name = 'applet-volume-control' +applet_title = 'Volume Control' + +a11y_test_init (program_name, None, 1) + +window_title = a11y_find_panel_with_applet (applet_title) + +if (window_title != None): + click (window_title, applet_title) + click (window_title, applet_title) +else: + print "No panel found with " + applet_title + +a11y_test_shutdown () diff --git a/scripts/gnome-panel.py b/scripts/gnome-panel.py index f933831..ba4e3df 100755 --- a/scripts/gnome-panel.py +++ b/scripts/gnome-panel.py @@ -6,12 +6,28 @@ from ldtputils import * from A11yTestUtils import * program_name = 'gnome-panel' -window_title = 'frmBottomExpandedEdgePanel' a11y_test_init (program_name, '', 1) -guiexist (window_title) +panel_titles = [ + 'frmBottomExpandedEdgePanel', + 'frmBottomEdgePanel', + 'frmBottomCenteredPanel', + 'frmRightExpandedEdgePanel', + 'frmRightEdgePanel', + 'frmRightCenteredPanel', + 'frmTopExpandedEdgePanel', + 'frmTopEdgePanel', + 'frmTopCenteredPanel', + 'frmLeftExpandedEdgePanel', + 'frmLeftEdgePanel', + 'frmLeftCenteredPanel' + ] -a11y_scan_window (window_title) +for window_title in panel_titles: + if (guiexist (window_title)): + a11y_scan_window (window_title) + else: + continue a11y_test_shutdown () |