Re: Testing GTK application




Gábor Szabó said:
While I don't see huge enthusiasm about the issue here on the mailing
list let me continue with what I found.

Don't confuse silence with lack of enthusiasm.  Your question is more about
gtk+ than about perl, and about win32 rather than X11, and so targets a very
small portion of the list members.  And, you asked on a weekend.  Patience.


I ran a GTK application written in Perl and tried to see what WinSpy
http://www.catch22.net/software/winspy.asp
knows about it.

I found a "gdkWindowToplevel" with the real title of the application.
Within that it found many window children and grandchildren and each one of
them was of "gdkWindowChild" type and each one of them had the name of the
program as its title. So it seems I cannot use that.

That's because of the way gtk+ and gdk work together.  Windowed GtkWidgets
create their own GdkWindows for events and display, at the toolkit level. 
Most of the GdkWindows are created with

  attributes.window_type = GDK_WINDOW_CHILD;
  attributes.wclass = GDK_INPUT_OUTPUT;

And remember, this is all based on an abstraction of an X11 toolkit.  The port
to win32 maps those attributes to WNDCLASS stuff, but since that's all the
information Gdk has, you don't get detailed names like you get in typical
Win32 apps that use the Win32 API.


The take-home message is that win32 testing tools designed to scrape
information from apps that use the Win32 API and controls probably will not
work very usefully with gtk+ or QT, as those toolkits draw everything
themselves.


But please don't take my word for it.  There have been several people talking
lately about desktop testing projects, and there are at least a few gui
testing systems around.  Check the archives of gtk-devel-list for posts about
testing, and see if what they're talking about is relevant to what you want.


-- 
muppet <scott at asofyet dot org>




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