Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

WebDriver

aslakhellesoy edited this page Sep 13, 2010 · 4 revisions

WebDriver (or Selenium 2.0) is a perfect match for Cuke4Duke. You can use it with any of Cuke4Duke’s supported programming languages. Here is a step definition written in Groovy:

When(~"I search for \"(.*)\"") { String query ->
  searchField = browser.findElement(By.name("q"))
  searchField.sendKeys(query)
  // WebDriver will find the containing form for us from the searchField element
  searchField.submit()
}

See the Groovy WebDriver example project for a full example.

Clone this wiki locally