From: Ahmed A. <asa...@ya...> - 2014-08-21 12:07:13
|
Hi, If the below doesn't work, then you need to investigate further in HtmlUnit code, which part that doesn't identity flash with your website. Ahmed private static BrowserVersion firefox31WithUptoDateFlash = new BrowserVersion( BrowserVersion.FIREFOX_31.getApplicationName(), BrowserVersion.FIREFOX_31.getApplicationVersion(), BrowserVersion.FIREFOX_31.getUserAgent(), BrowserVersion.FIREFOX_31.getBrowserVersionNumeric(), new BrowserVersionFeatures[] { BrowserVersionFeatures.STYLESHEET_HREF_EXPANDURL, BrowserVersionFeatures.STYLESHEET_HREF_STYLE_NULL }); static { PluginConfiguration plugin = new PluginConfiguration("Shockwave Flash", "Shockwave Flash 14.0 r0", "NPSWF32_14_0_0_145.dll"); plugin.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Adobe Flash movie","swf")); //plugin.getMimeTypes().add(new PluginConfiguration.MimeType("application/futuresplash", "FutureSplash movie", "spl")); firefox31WithUptoDateFlash.getPlugins().add(plugin); } ________________________________ From: dhashi88 <dha...@ho...> To: htm...@li... Sent: Thursday, August 21, 2014 9:41 AM Subject: [Htmlunit-user] How to enable my (htmlunit) browser work as Flash enabled? i was able to do in HtmlUnit 2.13 version by private static BrowserVersion firefox17WithUptoDateFlash = new BrowserVersion( BrowserVersion.FIREFOX_17.getApplicationName(), BrowserVersion.FIREFOX_17.getApplicationVersion(), BrowserVersion.FIREFOX_17.getUserAgent(), BrowserVersion.FIREFOX_17.getBrowserVersionNumeric(), new BrowserVersionFeatures[] { BrowserVersionFeatures.JS_FRAME_RESOLVE_URL_WITH_PARENT_WINDOW, BrowserVersionFeatures.STYLESHEET_HREF_EXPANDURL, BrowserVersionFeatures.STYLESHEET_HREF_STYLE_NULL }); static { PluginConfiguration plugin = new PluginConfiguration("Shockwave Flash", "Shockwave Flash 14.0 r0", "NPSWF32_14_0_0_145.dll"); plugin.getMimeTypes().add(new PluginConfiguration.MimeType("application/x-shockwave-flash", "Adobe Flash movie","swf")); //plugin.getMimeTypes().add(new PluginConfiguration.MimeType("application/futuresplash", "FutureSplash movie", "spl")); firefox17WithUptoDateFlash.getPlugins().add(plugin); } but same is not working for HtmlUnit 2.15 . what is the reason. How can i achieve this? ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Htmlunit-user mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |