2012-05-04 14:34:53 -07:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
2011-11-16 08:58:30 -08:00
|
|
|
|
|
|
|
// Import mozmill and initialize a controller
|
|
|
|
Components.utils.import("resource://mozmill/driver/mozmill.js");
|
|
|
|
let controller = getBrowserController();
|
|
|
|
|
2012-02-14 07:23:25 -08:00
|
|
|
controller.open("http://google.com");
|
2011-11-16 08:58:30 -08:00
|
|
|
controller.waitForPageLoad();
|
|
|
|
|
|
|
|
let textbox = findElement.ID(controller.tabs.activeTab, 'lst-ib');
|
|
|
|
let button = findElement.Name(controller.tabs.activeTab, 'btnK');
|
2012-02-14 07:23:25 -08:00
|
|
|
pep.performAction('enter_text', function() {
|
2011-11-16 08:58:30 -08:00
|
|
|
textbox.sendKeys('foobar');
|
|
|
|
button.click();
|
|
|
|
});
|