Skip to content

Instantly share code, notes, and snippets.

@impressiver
Created August 29, 2011 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save impressiver/1179387 to your computer and use it in GitHub Desktop.
Save impressiver/1179387 to your computer and use it in GitHub Desktop.
var driver = browserMob.openBrowserWebDriver();
browserMob.beginTransaction();
browserMob.beginStep("Go to google home page");
driver.get("http://www.google.com");
// Find the text input element by its name
var element = driver.findElement(By.name("q"));
// Enter something to search for
element.sendKeys("Cheese!");
// Now submit the form. WebDriver will find the form for us from the element
element.submit();
browserMob.waitForNetworkTrafficToStop(3000, 10000);
browserMob.endStep();
browserMob.endTransaction();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment