Bugs item #1745433, was opened at 2007-06-29 17:36
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1745433&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HtmlUnit plugin
Group: Release 2.1
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Peter Blanchard (skywalkin)
Assigned to: Jevon Wright (jevonwright)
Summary: Can't configure Javascript navigator object

Initial Comment:
Hello,

This problem is related to "[JWebUnit-development] [ jwebunit-Bugs-1724695 ] 
Javascript and its navigator is null", but not quite the same.

Doing some testing of an existing web application that uses Javascript to 
detect what browser is using it.  Currently, it uses navigator.appName (for 
detecting Netscape) and navigator.appVersion to detect the browser version (for 
IE version info).

The problem is that, while I set my User-Agent properly, the javascript on the 
client-side that gets run does not have access to it (or, when I set it using 
setUserAgent on the TestContext, it does not force an update on the default 
"navigator" object in the javascript engine).

I need a way to configure it.

Thanks in advance.

-- DEBUG START --
[DEBUG] Navigator - -Property "appName" of [EMAIL PROTECTED] not defined as 
pure js property
[DEBUG] Navigator - -Property "appVersion" of [EMAIL PROTECTED] not defined as 
pure js property
-- DEBUG END --


----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 2008-12-08 02:22

Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Peter Blanchard (skywalkin)
Date: 2008-11-18 05:20

Message:
I'll download the new version and give it a try, I have not been using this
since I first ran into this problem since there was no workaround (and no
response until now).

----------------------------------------------------------------------

Comment By: Jevon Wright (jevonwright)
Date: 2008-11-18 01:59

Message:
Hi, in r760 a fix was applied to allow test cases to properly configure the
user agent, including access to the user agent with Javascript. (See issue
1724695.) Can you confirm that this bug still exists?

With an HtmlUnitTestingEngineImpl you may configure the user agent like
so:

((HtmlUnitTestingEngineImpl)
getTester().getTestingEngine()).setDefaultBrowserVersion(
BrowserVersion.INTERNET_EXPLORER_7_0 );
beginAt("/url");

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1745433&group_id=61302

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to