The “Java – WebDriverBackedSelenium” exporter I found generates code
like this:
selenium.open(“/”);
selenium.type(“Password”, “blah”);
etc..
But I need it to export like the classic WebDriver example below:
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("Cheese!");
is there a way to export to the 2nd option? I’m being asked to use this, and have used the ide to get
the page id tags in the past, it would be nice to export to this format if possible. Does anyone know
or have any opinions on this?
You can export the recorded Selenium tests as “JUnit 4 (WebDriver)” tests instead of “JUnit 4 (WebDriver Backed)” tests, if you need to use the
WebDriverAPI class alone and notSeleniumclass in your tests.PS: It would also help to use a more up to date version of the Selenium IDE; v.1.2.0 (which is the most recent version of the IDE as of now) definitely supports exporting tests cases to use the WebDriver API.