[BangPypers] Using dogtail to test/automate gtk apps
srijayanth at gmail.com
Wed Jul 29 14:55:45 CEST 2009
For some vague reason the click() function isn't defined on certain types of
Node objects, I have no clue why, I haven't looked at the code in detail,
but I took the Node.click() method, rewrote it as a standalone function and
passed the eventbox into it and it works. So I think this might actually be
a bug at some level, or a really strange feature.
Nagappan, thanks for LDTP. I'll take a look at that one as well.
On Wed, Jul 29, 2009 at 5:57 PM, Nagappan Alagappan <nagappan at gmail.com>wrote:
> Hello Jayanth,
> Did you get a chance to try the same with LDTP  ? Its being used by
> GNOME automation project , Ubuntu, VMware, Palm Source.
>  - http://ldtp.freedesktop.org
>  - http://mago.ubuntu.com
> On Wed, Jul 29, 2009 at 12:07 AM, Srijayanth Sridhar <srijayanth at gmail.com
> > wrote:
>> I am trying to use dogtail to make a demonstration about automating tests
>> for certain gtk applications we develop. I managed to get a fair bit of it
>> working but I am having a hard time getting dogtail to send events to
>> certain types of widgets, primarily the EventBox widget.
>> I've googled and not found anything significant. Has anyone worked on
>> this? I am pasting some code.
>> # This program draws a simple window with an event box in it. The
>> # eventbox is attached to the on_evbox_clicked() function and prints
>> # a simple message upon being clicked.
>> import pygtk
>> import atk
>> import gtk
>> def on_evbox_clicked(evbox,event):
>> print "Simple click event"
>> evbox = gtk.EventBox()
>> evbox_acc = evbox.get_accessible()
>> evbox_acc.set_name("test event box")
>> window = gtk.Window()
>> window_acc = window.get_accessible()
>> window_acc.set_name("test window")
>> # end of eventbox.py
>> from dogtail.utils import run
>> from dogtail import tree
>> from os import environ,path,remove
>> evbox=app.child("test event box")
>> print evbox.actions
>> # actions are showing up as an empty dict. :(
>> So for some vague reason the eventbox has no actions associated with it.
>> Does anyone have a clue why this is so?
>> Thank you,
>> BangPypers mailing list
>> BangPypers at python.org
> Linux Desktop (GUI Application) Testing Project -
> BangPypers mailing list
> BangPypers at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BangPypers