title: Error while exporting html test to Junit4 / Webdriver using Selenium IDE
body: <p>I have following selenium IDE code when exported to JUnit 4 (Webdriver) returns an error.</p>
  
  <p>Though It works fine when I export it as Selenium RC. </p>
  
  <p><em><strong>Kindly tell me the webdriver equivalent for below errors --</em></strong></p>
  
  <p>IDE Code :</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;deleteAllVisibleCookies&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;open&lt;/td&gt;
  &lt;td&gt;/index.html&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;selectFrame&lt;/td&gt;
  &lt;td&gt;content&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;select&lt;/td&gt;
  &lt;td&gt;librarySelect&lt;/td&gt;
  &lt;td&gt;label=XYZ Software Inc.&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;type&lt;/td&gt;
  &lt;td&gt;userNameInput&lt;/td&gt;
  &lt;td&gt;demoUser&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;type&lt;/td&gt;
  &lt;td&gt;passwordInput&lt;/td&gt;
  &lt;td&gt;demoPassword&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;td&gt;clickAndWait&lt;/td&gt;
  &lt;td&gt;submitButton&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  .......
  &lt;tr&gt;
  &lt;td&gt;clickAndWait&lt;/td&gt;
  &lt;td&gt;link=Admin&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  .......
  </code></pre>
  
  <p><strong>Exported Webdriver Code: [Contains Error]</strong></p>
  
  <pre><code>@Test
  public void testArchivalLogReport() throws Exception {
  // ERROR: Caught exception [ERROR: Unsupported command [deleteAllVisibleCookies |  | ]]
  driver.get(baseUrl + "/index.html");
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | content | ]]
  // ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
  // ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
  // ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
  // ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | relative=up | ]]
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | menu | ]]
  driver.findElement(By.linkText("Admin")).click();
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | relative=up | ]]
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | content | ]]
  driver.findElement(By.xpath("//td[11]/span/b")).click();
  // ERROR: Caught exception [Error: locator strategy either id or name must be specified explicitly.]
  // ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=content | ]]
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | name=content | ]]
  // Warning: verifyTextPresent may require manual changes
  try {
    assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*Data Extract[\\s\\S]*$"));
  } catch (Error e) {
    verificationErrors.append(e.toString());
  }
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | relative=up | ]]
  // ERROR: Caught exception [ERROR: Unsupported command [selectFrame | menu | ]]
  driver.findElement(By.xpath("//a/font")).click();
  }
  </code></pre>
  
  <p>Exported RC Code is Fine and looks like : </p>
  
  <pre><code>@Test
  public void testArchival Log Report() throws Exception {
      selenium.deleteAllVisibleCookies();
      selenium.open("/index.html");
      selenium.selectFrame("content");
      selenium.select("librarySelect", "label=XYZ Software Inc.");
      selenium.type("userNameInput", "demoUser");
      selenium.type("passwordInput", "demoPassword");
      selenium.click("submitButton");
      selenium.waitForPageToLoad("30000");
      selenium.selectFrame("relative=up");
      selenium.selectFrame("menu");
      selenium.click("link=Admin");
  ..........
   }
  </code></pre>
  
  <p><strong>How I am Exporting ?</strong> 
  I am using Java/ Junit 4/ Webdriver</p>
  
  <p>I can see <em>Java/ Junit 4/ Webdriver Backed</em>   in option, <strong>Should I go with that ??</strong> it gives me the same exported file as in Selenium RC option, only change is how we get webdriver. </p>