Re: dogtail How to control "Software Updater" or "pirut" program?



On Thu, 2008-01-03 at 02:05 +0800, Charles Tan wrote:
> I tried to login as a root and pirut did appear in sniff. But the buttons, menus
> could not be sniffed. I tried gedit, all was good.
It sounds like the pirut application appeared in the sniff tree view,
but did the top-level window appear below it?


> 
> Is it the related to pyGTK and all the pyGTK based applications could not be
> sniffed?
It shouldn't be; I'd expect pyGTK applications to work fine.  What
happens if you try a minimal pygtk app e.g. the hello world app from the
pygtk tutorial?


> 
> I wanted to use dogtail because of its ability to identify widgets by name or
> label, not just the x,y coordinations, which could save me a lot time
> on different
> screens or hardwares. But if the pyGTK+ programs could not be tested by it,
> I might need to fix it or find some alternatives.
> 
> Anyway, thank you for your reply!
> On Jan 3, 2008 12:22 AM, David Malcolm <dmalcolm redhat com> wrote:
> > On Sat, 2007-12-29 at 19:36 +0800, Charles Tan wrote:
> > > hi, guys,
> > > I'm a python rookie, and I want to automatically test some GUI
> > > programs, for example, the gnome Software Updater(or pirut). My idea
> > > is very simple, that use a program to control the other programs being
> > > tested.
> > > And I found dogtail is very good at testing gtk+ based applications.
> > > But it could not test pirut, which is written in python, because it
> > > couldn't sniff the buttons and menus inside the pirut.
> > > I've read some code of the pirut and it used gtk, gtk.glade to
> > > generate the windows. I don't know why pirut could not sniff the
> > > widgets in the "pirut" program. Could some kindly guys explain the
> > > reason? Or tell me an alternative method to automatically test
> > > "pirut"?
> >
> > You say that the widgets aren't visible in sniff; to what extent does
> > the app itself appear in sniff: does the app appear, do the windows?
> >
> > I have a vague memory of problems with privileged apps; "pirut" on
> > Fedora IIRC is launched with a wrapper script that asks for root's
> > password, and then runs pirut as root, and I think that this can stop
> > the app appearing in "sniff".
> >
> > If it's not appearing in "sniff", you could try launching the executable
> > directly, rather than the wrapper, or try running the whole thing logged
> > into a desktop session as root (which is not to be recommended in
> > general due to security risks).
> >
> > It's not going to work with dogtail if it doesn't appear in sniff, so
> > get this working first.
> >
> > Hope this helps, though I could be misremembering this.
> > Dave
> >
> >
> >



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]