sending UI events to an embedded browser
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1166920625.341073.127350__37717.5901820467$1166920832$gmane$org@42g2000cwt.googlegroups.com> |
hi all
I would like to be able to access my java embedded browser and send UI
events such as mouse click, keyboard etc.
Is there any direct way to do it within th xpcom API ? at first i tried
this approach :
nsIComponentManager registrar =
Mozilla.getInstance().getComponentManager();
nsISupports doc2 =
registrar.createInstance("{5d0fcdd0-4daa-11d2-b328-00805f8a3859}", null
, nsIDOMHTMLDocument.NS_IDOMHTMLDOCUMENT_IID);
nsIDOMHTMLDocument docdoc =
(nsIDOMHTMLDocument)
doc2.queryInterface(nsIDOMHTMLDocument.NS_IDOMHTMLDOCUMENT_IID);
System.out.println("title : "+
docdoc.getTitle());
System.out.println("URL:" +
docdoc.geURL());
I tried to get an instance of the html dom document object , but it
gave me no results
Perhaps i should somehow do it by injecting javascript snippets into
the dom document itself , but still.. i have a very vague idea how that
can be done.