如何修复“权限被拒绝访问属性’文档’”?

在尝试使用selenium rc进行自动化测试时遇到了这个问题。 我只是按照教程中的步骤操作。 这是代码(与教程相同):

[TestFixture] public class SeleniumTest { private ISelenium selenium; private StringBuilder verificationErrors; [SetUp] public void SetupTest() { selenium = new DefaultSelenium("localhost", 4444, @"*custom D:\Program Files (x86)\Firefox 4\firefox.exe", "http://www.google.com/"); selenium.Start(); verificationErrors = new StringBuilder(); } [TearDown] public void TeardownTest() { try { selenium.Stop(); } catch (Exception) { // Ignore errors if unable to close the browser } Assert.AreEqual("", verificationErrors.ToString()); } [Test] public void TheGoogleTest() { selenium.Open("/"); selenium.Type("lst-ib", "selenium"); try { Assert.IsTrue(selenium.IsTextPresent("Selenium - Web Browser Automation")); } catch (AssertionException e) { verificationErrors.Append(e.Message); } } } 

当我运行测试时,我的firefox-5浏览器弹出,url如下所示:
http://www.google.com/selenium-server/core/RemoteRunner.html?sessionId=507c2d6ec7214587984f0f86148e9ff5&multiWindow=true&baseUrl=http%3A%2F%2Fwww.google.com%2F&debugMode=false

我认为url应该是http:// localhost:4444并更改了url(剩下的就是其余部分)。 现在打开一个selenium页面(右侧有命令)。 然后它会打开谷歌页面,但之后没有任何内容。 并且nunit向我显示测试用例失败,说明原因: 拒绝访问属性’文档’的权限

任何的想法? 提前致谢。

有人在sqa.stackexchange.com上回答了这个问题:

我试过"*chrome D:\Program Files (x86)\Firefox 4\firefox.exe" ,似乎它正在运行。

从提到的链接引用:

这里*chrome指的是firefox浏览器,并且对java脚本安全限制具有提升的安全权限。