Skip to content

Instantly share code, notes, and snippets.

@fouad
Forked from crcn/mrrobot-signup.js
Created October 1, 2015 23:13
Show Gist options
  • Save fouad/c888f016ba14bcdc66a7 to your computer and use it in GitHub Desktop.
Save fouad/c888f016ba14bcdc66a7 to your computer and use it in GitHub Desktop.
// sign up flow
var ie = yield launch("ie", 8, "http://localhost:8080");
yield robot.focus(ie);
yield robot.find({
type: "button",
text: "sign up"
}).click();
yield robot.find({
text: "email address",
type: "input"
}).type("a@b.com");
yield robot.find({
text: "password",
type: "input" // use machine learning to define what an input looks like
}).type("password");
yield checkEmail(robot);
function checkEmail*(robot) {
var previousFocus = robot.focus();
var chrome = yield launch("chrome", 8, "http://localhost:8080");
yield robot.focus();
// check gmail stuff here
yield robot.focus(previousFocus);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment