Hi, I really don't know if I it's too late and if I should shut my computer down, but, in my Internet Explorer, following gives "Microsoft Internet Explorer" --------------- <html><head> </head><body onload="alert(navigator.appName)"> </body></html> ---------------
so if you configure User-Agent to "4.0 (compatible; MSIE 6.0; Windows 98)" then I really find normal that HtmlUnit evaluates navigator.appName to "Microsoft Internet Explorer". So, where is the problem? Cheers, Marc. -- Blog: http://mguillem.wordpress.com Corey wrote: > Anything but Microsoft > This is what we have that is dependent on detecting a Microsoft browser: > var IE = (navigator.appName.indexOf("Microsoft") >= 0); > Whats funny is "Microsoft Windows" does not even show up in IE 6 or 7, > but we did not write this code. It is part of an AJAX library, and I > rather not edit it, because it may be needed by other browsers, perhaps > older than IE 6. > > Specifically, what I expected is exactly what I set the User Agent to. > According to the log, It is being set some where behind the seen, and I > cant seem to find where that is being done. > > Marc Guillemot wrote: >> >> and what should it be? >> >> http://msdn2.microsoft.com/en-us/library/ms533079(VS.85).aspx >> <http://msdn2.microsoft.com/en-us/library/ms533079%28VS.85%29.aspx> >> >> Cheers, >> Marc. >> -- >> Blog: http://mguillem.wordpress.com >> >> >> Corey wrote: >> > Its exactly as I described: >> > I set the User Agent to: "4.0 (compatible; MSIE 6.0; Windows 98)" >> > >> > When calling navigator.appName I get "Microsoft Internet Explorer", >> > which matches exactly what is in the log below. >> > >> > Log output from the console it shows me this: >> > [config] INFO (com.canoo.webtest.engine.Configuration) - Using browser >> > versi >> > on (Microsoft Internet Explorer, 4.0 (compatible; MSIE 6.0b; Windows >> > 98), 4.0 (c >> > ompatible; MSIE 6.0; Windows 98), 1.2, 6.0). If the javascript support >> > is not as >> > expected, then it's time to go into the sources >> > [config] INFO (com.canoo.webtest.engine.Configuration) - >> Configuring 1 >> > HTTP >> > header field(s) >> > [config] INFO (com.canoo.webtest.engine.Configuration) - Skipped >> > User-Agent >> > header as it has already been configured in the BrowserVersion >> > >> > Marc Guillemot wrote: >> >> >> >> In this case I don't follow. >> >> >> >> Can you provide an example of User-Agent you set and of unexpected >> >> behavior with this user agent? >> >> >> >> Cheers. >> >> Marc. >> >> -- >> >> Blog: http://mguillem.wordpress.com >> >> >> >> >> >> Corey wrote: >> >> > The point is, it is not what I want. The User-Agent specified is >> >> only as >> >> > an example. >> >> > >> >> > Marc Guillemot wrote: >> >> >> >> >> >> ??? >> >> >> isn't "Microsoft Internet Explorer" correct for "MSIE 6.0"? >> >> >> >> >> >> Cheers, >> >> >> Marc. >> >> >> -- >> >> >> Blog: http://mguillem.wordpress.com >> >> >> >> >> >> Corey wrote: >> >> >> > I am setting the user agent as follows: >> >> >> > <config >> >> >> > host="localhost" >> >> >> > port="80" >> >> >> > protocol="http" >> >> >> > basepath="" > >> >> >> > <header name="User-Agent" value="4.0 (compatible; MSIE >> 6.0; >> >> >> > Windows 98)"/> >> >> >> > </config> >> >> >> > >> >> >> > But this does not work.When I check navigator.appName I get >> >> "Microsoft >> >> >> > Internet Explorer" >> >> >> > >> >> >> > Looking at the log output from the console it shows me this: >> >> >> > [config] INFO (com.canoo.webtest.engine.Configuration) - Using >> >> browser >> >> >> > versi >> >> >> > on (Microsoft Internet Explorer, 4.0 (compatible; MSIE 6.0b; >> Windows >> >> >> > 98), 4.0 (c >> >> >> > ompatible; MSIE 6.0; Windows 98), 1.2, 6.0). If the javascript >> >> support >> >> >> > is not as >> >> >> > expected, then it's time to go into the sources >> >> >> > [config] INFO (com.canoo.webtest.engine.Configuration) - >> >> Configuring >> >> >> > 1 HTTP >> >> >> > header field(s) >> >> >> > [config] INFO (com.canoo.webtest.engine.Configuration) - >> Skipped >> >> >> > User-Agent >> >> >> > header as it has already been configured in the BrowserVersion >> >> >> > >> >> >> > So the header is getting set by some other function, not mine. I >> >> have >> >> >> > done numerous searching for text in files to find this and I have >> >> not >> >> >> > found anything. Where is the header getting set? >> >> >> > _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

