title: How to fix "Permission denied to access property 'document'"?
body: <p>While trying to automate testing with selenium rc I ran into this problem. I was just following the steps in the tutorials. Here is the code (same as tutorials):</p>
  
  <pre><code>[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);
          }
      }
  }
  </code></pre>
  
  <p>When I run the test, my firefox-5 browser pops up and the url looks like this:<br>
  <em>http://www.google.com/selenium-server/core/RemoteRunner.html?sessionId=507c2d6ec7214587984f0f86148e9ff5&amp;multiWindow=true&amp;baseUrl=http%3A%2F%2Fwww.google.com%2F&amp;debugMode=false</em></p>
  
  <p>I thought the url should be <em>http://localhost:4444</em> and changed the url (leaving the rest). Now a selenium page opens up (with commands on the right). It then opens the google page, but nothing after that. And nunit shows me the test case failed, stating the reason: <em>Permission denied to access property 'document'</em></p>
  
  <p>Any idea? Thanks in advance.</p>