Skip to content

Instantly share code, notes, and snippets.

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 prolificcoder/11dcff13ab951e9a74484c9b77ce892e to your computer and use it in GitHub Desktop.
Save prolificcoder/11dcff13ab951e9a74484c9b77ce892e to your computer and use it in GitHub Desktop.
uniform enter pins method
enterPins: function (driver) {
return driver
.elementById(screens.pinScreen.title)
.should.eventually.exist
.elementsById(screens.numpad.key1).last()
.click()
.elementsById(screens.numpad.key2).last()
.click()
.then(function() {
//In android system alert comes after our custom alert and vice-versa in iOS
if (process.env.PLATFORM != 'iOS') {
return driver.elementById(screens.notificationPopup.pinCreated)
.click()
.elementById(screens.notificationPopup.ok)
.click();
}
else {
return driver.elementById(screens.notificationPopup.ok)
.click()
.elementById(screens.notificationPopup.pinCreated)
.click();
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment