Created
April 8, 2016 16:41
-
-
Save prolificcoder/11dcff13ab951e9a74484c9b77ce892e to your computer and use it in GitHub Desktop.
uniform enter pins method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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