title: Selenium IDE export to Selenium 2
body: <p>Selenium IDE exporting to PHP for Selenium 2 shows errors in simple commands like isElementPresent. How to fix the errors?</p>
  
  <p>This is what I’ve done:</p>
  
  <p>Get Phpunit installed and working 
  Running Selenium 2 server-selenium-server-standalone-2.39.0.jar 
  Record test case using selenium IDE 2.4.0 
  Export the testcase to php file.  (I used this formatter: <a href="https://github.com/suzuki/PHP-Formatter-PHPUnit_Selenium2" rel="nofollow">https://github.com/suzuki/PHP-Formatter-PHPUnit_Selenium2</a> ) 
  Using phpunit to execute the test.</p>
  
  <p>The problem is that the formatter is outputting errors because it can’t find  isElementPresent.
  This is the error:</p>
  
  <pre><code>ERROR: Caught exception [TypeError: WDAPI.Utils.isElementPresent is not a function]
  </code></pre>
  
  <p>This is the output of the formatter:</p>
  
  <pre><code>class Test2 extends PHPUnit_Extensions_Selenium2TestCase
  {
  /**
   * Setup
   */
  public function setUp()
  {
      $this-&gt;setBrowser('firefox');
      $this-&gt;setHost('127.0.0.1');
      $this-&gt;setPort(4444);
      $this-&gt;setBrowserUrl('http://mydomain.com/');
  }
  
  /**
   * Method test2
   * @test
   */
  public function test2()
  {
      $this-&gt;url("/dvp/index.php?option=com_binja&amp;controller=csinfo&amp;task=loginThenFetchMoreItemsForFranchise&amp;franchiseId=1&amp;itemId=56&amp;poiId=");
      // ERROR: Caught exception [TypeError: WDAPI.Utils.isElementPresent is not a function]
      $this-&gt;assertTrue($this-&gt;byXPath("//*[@id='authorize']")-&gt;displayed());
      $this-&gt;byId("binjaEnteredZip")-&gt;value("01945");
      $this-&gt;byId("btnZipSubmit")-&gt;click();
  }
  }
  </code></pre>