views:

253

answers:

1

Is it real to fire user-like events (like mouse click on link) for QWebElement? I.e., for instance, given QWebElement from current frame (using QWebKit) for html tag ("") I want programmatically click() this element.

In more complicated situations, there are more interestings things, like How to emit OnChange event for html UL element? In this case, I not only emit OnChange(), but also set new element from enumeration in role Current Element (in user-like behavior, there are two steps: 1. Click on UL (after this box with elements expanded) 2. Select some element)

I already solve this problem for elements with manually (by site-developer programmers) wroted attributes like onclick=..., onchange=..., etc by using jQuery in real-time and its function trigger(...).

But, problem with programmatically fire user-like events is big for me, pleast help)

+1  A: 

Try the evaluateJavaScript method from http://qt.nokia.com/doc/4.6-snapshot/qwebelement.html#evaluateJavaScript

Raindog