title: Selenium Webdriver Exception: waitForPageToLoad is not a valid webdriver command?
body: <p>I'm new to selenium testing and am trying to get my first test up and running using phpunit and selenium server 2.</p>
  
  <p>I had it all setup using one of the online tutorials for automated testing, and now I'm trying to use the Firefox Selenium IDE to record the flow through the signup process on our website.</p>
  
  <p>I've installed the php formatter for the IDE and exporting the recorded commands for PHPUnit, but when I run the code through PHPUnit I get:</p>
  
  <p>Exception: waitForPageToLoad is not a valid webdriver command.</p>
  
  <p>Any help would be much appreciated!</p>
  
  <p>Many Thanks,
  Ian</p>
  
  <pre><code>&lt;?php
  require_once __DIR__ . '/../../../lib/php-webdriver/__init__.php';
  
  class HomePageTest extends PHPUnit_Framework_TestCase
  {
      /** 
      * @var WebDriverSession
      */
      protected $_session;
  
      public function setUp()
      {
          parent::setUp();
          $web_driver = new WebDriver();
          $this-&gt;_session = $web_driver-&gt;session();
      }
  
      public function tearDown()
      {
          $this-&gt;_session-&gt;close();
          unset($this-&gt;_session);
          parent::tearDown();
      }
  
      public function test_free_signup_process()
      {
          $this-&gt;_session-&gt;open('http://---.com');
          $this-&gt;_session-&gt;click("link=View Pricing");
          $this-&gt;_session-&gt;waitForPageToLoad("30000");
          $this-&gt;_session-&gt;click("link=Free Account");
          $this-&gt;_session-&gt;waitForPageToLoad("30000");
          $this-&gt;_session-&gt;type("id=first_name", "---");
          $this-&gt;_session-&gt;type("id=last_name", "---");
          $this-&gt;_session-&gt;type("id=password_tf", "---");
          $this-&gt;_session-&gt;type("id=password_confirm", "---");
          $this-&gt;_session-&gt;type("id=recaptcha_response_field", "tsTooki status:");
          $this-&gt;_session-&gt;click("id=checkbox_terms");
          $this-&gt;_session-&gt;click("css=input[type=\"submit\"]");
          $this-&gt;_session-&gt;waitForPageToLoad("30000");
          $this-&gt;_session-&gt;click("link=registration code");
          $this-&gt;_session-&gt;waitForPageToLoad("30000");
          $this-&gt;_session-&gt;type("id=code", "---");
          $this-&gt;_session-&gt;click("css=input[type=\"submit\"]");
          $this-&gt;_session-&gt;waitForPageToLoad("30000");
  
      }
  }
  </code></pre>