Re: Replacing Test::WWW::Selenium::Catalyst with Gtk3::WebKit



On Monday 28 November 2011 21:50:56 Torsten Schoenfeld wrote:

Yeah, a bit of XS should be enough to get a workaround (just write a
specialized XSUB for each kind of event you need to create; use
gperl_new_boxed to create an SV from an event struct).

Took me several hours to do this with all the figuring out how to actually get 
it to build and how to wrap/unwrap parameters and how to actually get a 
GdkWindow from my Gtk3::Window. The result unfortunately is, that it still 
doesn't work. And of course only after wasting all these hours I found a 
function that would just do it all for me. So the current code is:

Gtk3::test_widget_send_key($self->view, int($key), 'GDK_MODIFIER_MASK');

But alas...it still creates no keyboard events in JavaScript, same as with the 
XS version. 

I don't know yet how to implement proper suppport.  The interface would
ideally look like what Gtk2 provides: each event object is automatically
blessed into the correct sub-package which then provides the specialized
accessors relevant to the event type.

Sounds good to me. Only that I now think that even that would not help me, 
since the event just gets ignored.

Out of sheer desperation I took X11::Xlib and called XTestFakeKeyEvent and 
finally got some reaction. But of course, having to have a visible window 
which has to have the focus was not exactly what I had in mind for improving 
automated tests...

Stefan

Attachment: signature.asc
Description: This is a digitally signed message part.



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