Hi Paul,
Thanks for replying. Alas, I am still doing something
wrong. Please find attached the exact steps I'm
taking. I must be doing one of these steps incorrectly
because I can't get the google test to work.
--- paul cannon <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 18, 2005 at 04:44:30AM -0700, vernon
> viles wrote:
> > OK, not even the files technique is working. I
> must be
> > doing something wrong. If Paul is out there, did
> the
> > file technique work for you?
>
> Yes.
>
> What I imagine you're missing is the actual
> assertion of the
> capabilities you granted.
>
> For any javascript code to actually use any of those
> capabilities, the
> function it's in or a calling function needs to have
> called:
>
>
>
netscape.security.PrivilegeManager.enablePrivilege(capstr);
>
> where capstr is a string containing a
> space-separated list of the
> capabilities you need your code to have (like
> "UniversalBrowserRead
> UniversalFileRead ...").
>
> Our solution was to hook into the
> kickoffNextCommandExecution method in
> the TestLoop like so:
>
> testLoop.reallyKickoffNextCommandExecution =
> testLoop.kickoffNextCommandExecution;
> testLoop.kickoffNextCommandExecution = function ()
> {
>
>
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
> UniversalFileRead UniversalBrowserWrite
> UniversalBrowserAccess");
> return
> testLoop.reallyKickoffNextCommandExecution();
> }
>
> (that is done in our SeleneseRunner.html equivalent,
> right before
> testLoop.start().)
>
> Normally that enablePrivilege call would make a
> dialog pop up asking the
> user if that script should be allowed to have those
> capabilities, but
> the "granted" line in our user.js tells Mozilla
> [Firefox] to always
> grant those permissions without asking.
>
> --
> paul
> _______________________________________________
> Selenium-users mailing list
> Selenium-users@lists.public.thoughtworks.org
>
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users
>
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
#### PLEASE NOTE: SHOULD YOU STUMBLE UPON THIS, THE FOLLOWING
#### INSTRUCTIONS ARE A WORK IN PROGRESS AND DO NOT CURRENTLY WORK FOR ME.
1. Create a user.js file in the directory (if you haven't created one before)
~/.mozilla/firefox/xxxxxxxx.yourusername/user.js
2. Enter the following into the user.js file:
user_pref("capability.policy.policynames", "localselenium");
user_pref("capability.policy.localselenium.sites", "file://");
/* Or if using the server method
user_pref("capability.policy.localselenium.sites", "http://testingserver");
*/
user_pref("capability.policy.localselenium.javascript.enabled", "allAccess");
user_pref("capability.policy.localselenium.DOMParser", "allAccess");
user_pref("capability.policy.localselenium.HTMLDocument.getElementsByName",
"allAccess");
user_pref("capability.policy.localselenium.HTMLDocument.evaluate", "allAccess");
user_pref("capability.policy.localselenium.HTMLInputElement.value",
"allAccess");
user_pref("capability.policy.localselenium.HTMLInputElement.dispatchEvent",
"allAccess");
user_pref("capability.policy.localselenium.HTMLAnchorElement.dispatchEvent",
"allAccess");
user_pref("capability.policy.localselenium.HTMLAnchorElement.href",
"allAccess");
user_pref("capability.policy.localselenium.History", "allAccess");
user_pref("capability.policy.localselenium.DOMException", "allAccess");
user_pref("capability.policy.localselenium.Location", "allAccess");
user_pref("capability.policy.localselenium.SOAPCall", "allAccess");
user_pref("capability.policy.localselenium.Window.alert", "allAccess");
user_pref("capability.policy.localselenium.Window.confirm", "allAccess");
user_pref("capability.policy.localselenium.Window.open", "allAccess");
user_pref("capability.policy.localselenium.Window.closed", "allAccess");
user_pref("capability.policy.localselenium.Window.addEventListener",
"allAccess");
user_pref("capability.policy.localselenium.Window.document", "allAccess");
user_pref("capability.policy.localselenium.Window.location", "allAccess");
user_pref("capability.policy.localselenium.XMLHttpRequest.open", "allAccess");
user_pref("capability.policy.localselenium.checkloaduri", "allAccess");
3. Add the following to your
path_to_selenium_folder/selenium/SeleneseRunner.html file, just before
testLoop.start();:
testLoop.reallyKickoffNextCommandExecution =
testLoop.kickoffNextCommandExecution;
testLoop.kickoffNextCommandExecution = function ()
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
UniversalFileRead UniversalBrowserWrite UniversalBrowserAccess");
return testLoop.reallyKickoffNextCommandExecution();
}
i.e insert the above code like this:
function runTest() {
...
<insert code snippet here>
testLoop.start();
}
4. Open the firefox browser and enter the following into the address bar:
# Using the file method
file:///path_to_selenium_folder/selenium/TestRunner.html?test=tests/GoogleTestSuite.html
# Using the server method
http://testingserver/selenium/TestRunner.html?test=tests/GoogleTestSuite.html
5. Run the test. If the test works then local testing from your firefox browser
is possible.
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users