Skip to content

Instantly share code, notes, and snippets.

@crcn
Created October 1, 2015 23:12
Show Gist options
  • Save crcn/a7309d813c3f38007674 to your computer and use it in GitHub Desktop.
Save crcn/a7309d813c3f38007674 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