Skip to content

Instantly share code, notes, and snippets.

@tuliobluz
Last active August 1, 2018 13:02
Show Gist options
  • Save tuliobluz/2c30a98c791bb727c2b0599907d3d1d0 to your computer and use it in GitHub Desktop.
Save tuliobluz/2c30a98c791bb727c2b0599907d3d1d0 to your computer and use it in GitHub Desktop.
spec.po.js
let nameInput,
greeting;
module.exports = {
init: () => {
nameInput = element(by.model('yourName'));
greeting = element(by.binding('yourName'));
},
get: (string) => {
console.log(browser.getSession().value_.id_);
return browser.get(string);
},
setName: (name) => {
return nameInput.sendKeys(name);
},
getGreetingText: () => {
return greeting.getText();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment