title: Selenium opens a strange URL when testing
body: <p>When I start a test with Selenium, Firefox gives a "File not found" error because the URL is:</p>
  
  <blockquote>
    <p>chrome://src/content/RemoteRunner.html?sessionId=b147cdb005864b69b5fbe8cbb74639fb&amp;multiWindow=true&amp;baseUrl=http%3A%2F%2Flocalhost&amp;debugMode=false&amp;driverUrl=<a href="http://localhost:4444/selenium-server/driver/" rel="nofollow">http://localhost:4444/selenium-server/driver/</a></p>
  </blockquote>
  
  <p>...which is completely different than what I configured it to open (localhost/admin)</p>
  
  <p>Why is it opening this URL in the first place, with chrome: in it, when I don't even have Chrome?</p>
  
  <p>Selenium log:</p>
  
  <pre><code>18:21:23.580 INFO - Launching a standalone Selenium Server
  18:21:23.616 INFO - Java: Oracle Corporation 24.91-b01
  18:21:23.616 INFO - OS: Linux 3.19.0-32-generic amd64
  18:21:23.634 INFO - v2.48.0, with Core v2.48.0. Built from revision 41bccdd
  18:21:23.714 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
  registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet        explorer, version=}] does not match the current platform LINUX
  18:21:23.714 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
  registration capabilities Capabilities [{platform=WINDOWS, browserName=MicrosoftEdge, version=}] does not       match the current platform LINUX
  18:21:23.714 INFO - Driver class not found: com.opera.core.systems.OperaDriver
  18:21:23.715 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
  18:21:23.796 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
  18:21:23.796 INFO - Selenium Server is up and running
  18:21:28.215 INFO - Command request: getNewBrowserSession[firefox, http://localhost] on session null
  18:21:28.217 INFO - creating new remote session
  18:21:28.238 WARN - Caution: '/usr/bin/firefox': file is a script file, not a real executable.  The browser         environment is no longer fully under RC control
  18:21:28.240 INFO - Allocated session 48b6b368a2f74e4aac71f8e8fe063c50 for http://localhost, launching...
  jar:file:/home/davion100/Documents/selenium-server-standalone-2.48.2.jar!/customProfileDirCUSTFFCHROME
  18:21:28.427 INFO - Launching Firefox...
  </code></pre>
  
  <p>Test:</p>
  
  <pre><code>&lt;?php
  use PHPUnit\Extensions\SeleniumTestCase;
  use ApplicationTest\Bootstrap;
  require_once ("Config.php");
  
  class AdminSelectionComponentsTest extends PHPUnit_Extensions_SeleniumTestCase
  {
      protected $captureScreenshotOnFailure = true;
      protected $screenshotPath = "";
      protected $screenshotUrl = "http://*******/screenshots";
      protected $path = PATH;
      protected $componentName = "Test Component";
      protected $componentNameEdited = "Edited Test Component";
      protected $componentDescription = "This is a test component";
      protected $contextTitle = "Test Context";
      protected $contextTitleEdited = "Edited Test Context";
      protected $contextQuestion = "Is this a Test Question?";
      protected $contextQuestionEdited = "Is this an Edited Test Question?";
      protected $contextAnswer = "Yes";
      protected $componentDefaultDuration = 60;
      private static $oldComponent;
      private static $newComponent;
      private static $oldContext;
      private static $newContext;
      private static $oldQuestion;
      private static $newQuestion;
  
      /**
       * Set up
       * @see PHPUnit_Framework_TestCase::setUp()
       * @return void
       */
      protected function setUp()
      {
      $this-&gt;screenshotPath = __DIR__ . "/FailedTestsScreenshots";
      if(! file_exists($this-&gt;screenshotPath))
      {
          mkdir($this-&gt;screenshotPath);
      }
      $this-&gt;setBrowser(BROWSER);
      $this-&gt;setBrowserUrl($this-&gt;path);
      }
  
      /**
       * Test components info.
       * @return void
       */
      public function testComponentsInfo()
      {
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("link=Components");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;assertEquals("Components", $this-&gt;getText("css=h1"));
      $this-&gt;assertTrue($this-&gt;isElementPresent("css=table#dt_basic"));
      $this-&gt;click("css=a.btn.blue");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;assertEquals("Name", $this-&gt;getText("css=td.definition"));
      $this-&gt;assertEquals("DefaultDuration", $this-&gt;getText("css=td.definition:nth(1)"));
      $this-&gt;assertEquals("Archived", $this-&gt;getText("css=td.definition:nth(2)"));
      $this-&gt;assertEquals("Description", $this-&gt;getText("css=td.definition:nth(3)"));
      $this-&gt;click("link=back to the list of component objects");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;assertEquals("Components", $this-&gt;getText("css=h1"));
      $this-&gt;assertTrue($this-&gt;isElementPresent("css=table#dt_basic"));
      }
  
      /**
       * Test adding component.
       * @return void
       */
      public function testComponentsAdd()
      {
      $components = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ComponentTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$oldComponent = end($components);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("link=Components");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a[href='/admin/component/add']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;type("name=name", $this-&gt;componentName);
      $this-&gt;type("name=defaultDuration", $this-&gt;componentDefaultDuration);
      $this-&gt;type("name=description", $this-&gt;componentDescription);
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $componentsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ComponentTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newComponent = end($componentsNew);
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$newComponent-&gt;name == $this-&gt;isElementPresent("css=td:contains('$this-&gt;componentName')"));
      }
  
      /**
       * Test editing component.
       * @return void
       */
      public function testComponentEdit()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open("/admin/component/modify/id/" . self::$newComponent-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;type("name=name", $this-&gt;componentNameEdited);
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $componentsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ComponentTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newComponent = end($componentsNew);
      $this-&gt;assertTrue(self::$newComponent-&gt;name == $this-&gt;isElementPresent("css=td:contains('$this-&gt;componentNameEdited')"));
      }
  
      /**
       * Test adding context.
       * @return void
       */
      public function testContextAdd()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $contexts = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ContextTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$oldContext = end($contexts);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open("/admin/context/index/component/" . self::$newComponent-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a span#add");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;type("name=title", $this-&gt;contextTitle);
      $this-&gt;click("css=#submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $contextsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ContextTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newContext = end($contextsNew);
      $this-&gt;assertTrue(self::$oldContext-&gt;id &lt; self::$newContext-&gt;id);
      $this-&gt;assertTrue(self::$newContext-&gt;title == $this-&gt;isElementPresent("css=td:contains('$this-&gt;contextTitle')"));
      }
  
      /**
       * Test editing context.
       * @return void
       */
      public function testContextEdit()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$oldContext-&gt;id &lt; self::$newContext-&gt;id);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open($this-&gt;path."/admin/context/modify/id/" . self::$newContext-&gt;id . "/component/" . self::$newComponent-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;type("name=title", $this-&gt;contextTitleEdited);
      $this-&gt;click("css=#submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $contextsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ContextTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newContext = end($contextsNew);
      $this-&gt;assertTrue(self::$newContext-&gt;title == $this-&gt;isElementPresent("css=td:contains('$this-&gt;contextTitleEdited')"));
      }
  
      /**
       * Test Adding context question.
       * @return void
       */
      public function testContextQuestionAdd()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$oldContext-&gt;id &lt; self::$newContext-&gt;id);
      $questions = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ContextQuestionTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$oldQuestion = end($questions);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open("/admin/contextquestion/index/context/" . self::$newContext-&gt;id . "/component/" . self::$newComponent-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click(
              "css=a[href='/admin/contextquestion/add/component/" . self::$newComponent-&gt;id . "/context/" . self::$newContext-&gt;id . "']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;type("name=question", $this-&gt;contextQuestion);
      $this-&gt;runScript("CKEDITOR.instances['question'].setData('&lt;p&gt;$this-&gt;contextQuestion&lt;/p&gt;');");
      $this-&gt;click("css=#submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $questionsNew = iterator_to_array(
              Bootstrap::getServiceManager()-&gt;get("ContextQuestionTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newQuestion = end($questionsNew);
      $this-&gt;assertTrue(self::$oldQuestion-&gt;id &lt; self::$newQuestion-&gt;id);
      $this-&gt;assertTrue(self::$newQuestion-&gt;question == $this-&gt;isElementPresent("css=td:contains('$this-&gt;contextQuestion')"));
      }
  
      /**
       * Test editing context question.
       * @return void
       */
      public function testContextQuestionEdit()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$oldContext-&gt;id &lt; self::$newContext-&gt;id);
      $this-&gt;assertTrue(self::$oldQuestion-&gt;id &lt; self::$newQuestion-&gt;id);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("link=Components");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open(
              "/admin/contextquestion/modify/id/" . self::$newQuestion-&gt;id . "/component/" . self::$newComponent-&gt;id . "/context/" .
                       self::$newContext-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;select("name=type", "label=OPENQUESTION");
      $this-&gt;click("css=#submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $questionsNew = iterator_to_array(
              Bootstrap::getServiceManager()-&gt;get("ContextQuestionTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newQuestion = end($questionsNew);
      $this-&gt;assertTrue(self::$newQuestion-&gt;type == 1);
      }
  
      /**
       * Test deleting all.
       * @return void
       */
      public function testDeleteAll()
      {
      $this-&gt;assertTrue(self::$oldComponent-&gt;id &lt; self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$oldContext-&gt;id &lt; self::$newContext-&gt;id);
      $this-&gt;assertTrue(self::$oldQuestion-&gt;id &lt; self::$newQuestion-&gt;id);
      $this-&gt;open("/admin");
      $this-&gt;type("name=username", "admin");
      $this-&gt;type("name=password", "admin");
      $this-&gt;click("id=submitbutton");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("css=a.dropdown-toggle");
      $this-&gt;click("css=a[href='/admin/index/setsystem/system/5']");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;click("link=Components");
      $this-&gt;waitForPageToLoad("30000");
      $this-&gt;open("/admin/component/delete/id/" . self::$newComponent-&gt;id);
      $this-&gt;waitForPageToLoad("30000");
      $componentsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ComponentTable")-&gt;fetchAll(false, null, "id", null, null));
      $contextsNew = iterator_to_array(Bootstrap::getServiceManager()-&gt;get("ContextTable")-&gt;fetchAll(false, null, "id", null, null));
      $questionsNew = iterator_to_array(
              Bootstrap::getServiceManager()-&gt;get("ContextQuestionTable")-&gt;fetchAll(false, null, "id", null, null));
      self::$newComponent = end($componentsNew);
      self::$newContext = end($contextsNew);
      self::$newQuestion = end($questionsNew);
      $this-&gt;assertTrue(self::$oldComponent-&gt;id == self::$newComponent-&gt;id);
      $this-&gt;assertTrue(self::$oldContext-&gt;id == self::$newContext-&gt;id);
      $this-&gt;assertTrue(self::$oldQuestion-&gt;id == self::$newQuestion-&gt;id);
      }
  }
  </code></pre>