From: smk s. <ste...@gm...> - 2014-01-30 18:11:52
|
First of all thank you for your answer. webClient.setActiveXObjectMap(activeXMap) works and works fine IF the ActiveXObject is created with this declaration in javascript var wmi = new ActiveXObject("WMPlayer.OCX.7"); However it doesn't work when it gets created with the object tag e.g <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> 2014-01-30 Ahmed Ashour <asa...@ya...>: > HI, > > How about webClient.setActiveXObjectMap() > > Ahmed > > ------------------------------ > *From:* smk smk <ste...@gm...> > *To:* htm...@li... > *Sent:* Thursday, January 30, 2014 1:26 PM > *Subject:* [Htmlunit-user] Map <bject> to custom JavaClass > > The question also posted by me at StackOverflow and is the following: > > I am using HtmlUnit and I am trying to provide custom implementation for > ActiveXObjects. Although I can provide custom implementation when an > ActiveObject is called through javascript by name e.g. > > var wmi = new ActiveXObject("WMPlayer.OCX.7"); > > I cannot do the same when the object is declared with its classid like > > <object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="200" width="200"> > > I have found these threads > http://comments.gmane.org/gmane.comp.java.htmlunit.general/3894 and > http://sourceforge.net/p/htmlunit/bugs/691/ that describe the same > problem. > Also it appears that it can be done using > > client.setHtmlObjectMap(htmlObjectToJavaMapping); > > however, I am using htmlunit 2.13 and I cannot find this method. > Additionally I know that i could use jacob (java-com bridge) but jacob > communicates with existing/installed com-objects. I wish to provide my own > mock implementations. > I could not find any other information on the subject. Could you please > guide me on how this could be done? > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > |