--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
// Instantiate driver (opens a firefox browser window)
RemoteWebDriver driver = new FirefoxDriver();
// Load the desired page
driver.get("http://website.com/form");
// Pick out an input element and type a value
WebElement nameInputElement = driver.findElement(By.id("name-input-css-id"));
nameInputElement.sendKeys("Your name");
// Get the form element and submit the form
WebElement formElement = driver.findElement(By.id("form-element-css-id"));
formElement.submit();
// submit() will block until page has finished loading
// Get ID number
WebElement idNumberElement = driver.findElements(By.cssSelector("#confirmation > span")).get(0);
String idNumber = idNumberElement.getText().trim();