Bug 88648 - dcop access to DOM tree
Summary: dcop access to DOM tree
Status: CONFIRMED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 23:59 UTC by markus
Modified: 2005-11-08 15:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markus 2004-09-01 23:59:44 UTC
Version:           3.3 (using KDE 3.3.0,  (3.1))
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-9)
OS:                Linux (i686) release 2.4.24-pre1-xfs

In times of Service Level Agreements it is necessary to control and manage applications. Thus I thought it should be possible to control web transactions through an interface like DCOP. Response timing should also be possible, so DCOP should provide a signal that allows to measure how long the loading of a web page takes. 

Some should be comprehensible through a short thread on the kde-bindings list:

Richard Dale responds to my email: 

On Wednesday 01 September 2004 00:49, Markus Heller wrote:
> how can I make konqueror do the following through DCOP:
>
> - start up (is OK)
>
> - open a homebanking website: Handover of the URL as a cmdline option is
> not possible, because then the page will be downloaded first, and the
> following submit of user data will go to the downloaded file instead of to
> the bank... producing an error. I need to know which function whereabout in
> the scop tree accepts the URL.
>
> - enter the credentials to the according text fields: I need to know if and
> how the parse tree of the html page is represented through DCOP.
> Especially, how the various html items, especially html fields and
> interactive components such as submit buttons  can be accessed through DCOP
I don't think there is an interface to the 'parse tree of the html page' via 
docp.

> - simulate a click on a "login" field (an image): see above. I need to
> submit the previously entered credentials.
>
> - get any kind of feedback that the login page has finished loading: I need
> to know how long it took to load the page. This requires feedback in a
> sense that my script monitors the dcop interface and stops the counter if
> the page has been loaded. It should be possible to access the status of the
> little "loading" icon, the fact if the KDE wheel on the top right corner is
> still turning or if it is the static one.
>
> I want to do everything through DCOP, only through a script, without any
> user interaction.
I don't think you can do that with just the 'dcop' command line utility and 
kdialog, but you don't need to write in C++ either. There are some examples 
of using a KHTMLPart from python and ruby in kdebindings, see:

python/pykde/examples/pyKHTMLPart.py

korundum/rubylib/examples/rbKHTMLPart.rb
korundum/rubylib/examples/RubberDoc.rb
korundum/rubylib/examples/kludgeror.rb

Then you cold write your own 'custom konqueror' to access the homebanking 
website. The RubberDoc.rb example has code to walk round the DOM tree, which 
is the closest thing to your request about needing to access the html parse 
tree. But I'm not sure if there is an interface to KHTMLPart that allows you 
to programmatically fill out text fields though.

-------------
(Markus again):

I would like to simulate web-based access to whatever sites and measure response times. The firm I used to work for, sold a tool from a company called "Auditec" that was able to do measurements on the COM+ Windows layer. (www.auditec-newtest.com) This way it was possible to measure response time for almost all network oriented applications and many customers appreciated this. 

Especially in times where Service Level Agreements become ever more important, 
measuring application performance is a key issue. Glad enough, we have such a 
great interface with DCOP that allows to trigger applications on a script 
basis. Though, I would like to remote control the whole application in a way 
the end user would use it. Here: Konqueror.
Comment 1 Lars Vange 2005-11-08 15:55:54 UTC
*** This bug has been confirmed by popular vote. ***