From: Dave K. <dko...@ve...> - 2005-05-02 13:04:13
|
But I am running v 1.5 and am seeing the problem . Do you mean that it is fixed in versions *after* 1.5? Thanks, Dave At 03:10 AM 5/2/2005, you wrote: >Hi Dave, > >this has been fixed since version 1.5. If you build yourself from CVS you >will already benefit of the changes. > >Marc. > > >Dave Kosenko wrote: >>To followup my own message, I have determined that, in the scenario >>below, in most places in the >>code, the browser version is correctly transmitted as specified in the >>call to WebClient. >>However, in the code that handles javascript, specifically in >>Navigator.java, the value for userAgent as >>returned by jsGet_userAgent() is always >> "Mozilla/4.0 (compatible; MSIE 6.0b Windows98)" >>regardless of what it should be set to. As the above string is the >>default setting for BrowserVersion, >>I'd have to guess that Navigator.java is not referencing the >>BrowserVersion as set in WebClient() >>Dave >>At 01:21 PM 4/29/2005, Dave Kosenko wrote: >> >>>Ok, after more complete investigation, I must retract my statement that >>>there is a problem with >>>when the onload() function is being invoked in HTMLUnit. >>> >>>However, I think I have found another problem that was actually making >>>it look as though onload >>>was the problem. It appears that the problem lies with WebClient. In >>>my java program, I set up >>>a BrowserVersion to emulate Firefox: >>> >>>BrowserVersion bv; >>>... >>>bv = new BrowserVersion("Netscape", "5.0 (Windows; en-US)", "Mozilla/5.0 >>>(Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 >>>Firefox/1.0.3", "1.2"); >>>... >>>WebClient webClient = new WebClient(bv,); >>> >>>In the javascript brought into the page, I added an alert to tell me >>>what it thought the browser version >>>is (in the full code, this is critical, since it takes different actions >>>based on the type of browser): >>> >>>function DetectBrowser() { >>> alert(navigator.appName); >>> alert(navigator.appVersion); >>> alert(navigator.userAgent); >>> alert(navigator.appCodeName); >>> alert(navigator.platorm); >>>... >>>} >>> >>>And I get the following when I run the program: >>> >>>WARNING: window.alert("Microsoft Internet Explorer") no handler installed >>>WARNING: window.alert("4.0 (compatible; MSIE 6.0b; Windows98)") no >>>handler installed >>>WARNING: window.alert("Mozilla/4.0 (compatible; MSIE 6.0b; Windows98)") >>>no handler installed >>>WARNING: window.alert("Mozilla") no handler installed >>>WARNING: window.alert("Win32") no handler installed >>> >>>So either I am doing something very wrong, or my BrowserVersion is being >>>completely ignored. I also >>>tried using the various pre-defined BrowserVersion values in the >>>BrowserVersion class, all with the same >>>result. >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: NEC IT Guy Games. >>Get your fingers limbered up and give it your best shot. 4 great events, 4 >>opportunities to win big! Highest score wins.NEC IT Guy Games. Play to >>win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 >>_______________________________________________ >>Htmlunit-user mailing list >>Htm...@li... >>https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > >------------------------------------------------------- >This SF.Net email is sponsored by: NEC IT Guy Games. >Get your fingers limbered up and give it your best shot. 4 great events, 4 >opportunities to win big! Highest score wins.NEC IT Guy Games. Play to >win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |