hello,

JRexHTMLDocumentImpl htmlDOM = (JRexHTMLDocumentImpl)navigator
.getDocument();
JRexHTMLAnchorElementImpl link1 = (JRexHTMLAnchorElementImpl) links.item(0);
JRexEventTargetImpl clickEvent = (JRexEventTargetImpl) link1.getEventTarget
();
JRexMouseEventImpl mouseEvent = (JRexMouseEventImpl)
(((JRexHTMLDocumentImpl) htmlDOM).getDocumentEvent().createEvent(
"MouseEvents"));
JRexDocumentViewImpl dv = (JRexDocumentViewImpl) ((JRexHTMLDocumentImpl)
htmlDOM).getDocumentView();

mouseEvent.initMouseEvent("click", *true*, *false*, dv.getDefaultView(), 1,
1, 0, 1, 0, *false*, *false*, *false*,*false*, (*short*) 0, clickEvent);
clickEvent.dispatchEvent(mouseEvent);

I am using this code to simulate click on links from jrex. but this is not
working. I saw that people got it working. Do I need to initialize the
mouseListeners???

Regards,
Rajat
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to