Created
May 24, 2018 16:13
-
-
Save jcarlos7121/0cf74b11a09294886c465963e6952103 to your computer and use it in GitHub Desktop.
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
var timeOut = (1000 * 60).toLong(); | |
mDevice.wait(Until.findObject(By.clazz(WebView::class.java)), timeOut) | |
// Set Login | |
val emailInput = mDevice.findObject(UiSelector() | |
.instance(0) | |
.className(EditText::class.java)) | |
emailInput.waitForExists(timeOut) | |
emailInput.setText("[email protected]") | |
// Set Password | |
val passwordInput = mDevice.findObject(UiSelector() | |
.instance(1) | |
.className(EditText::class.java)) | |
passwordInput.waitForExists(timeOut) | |
passwordInput.setText("cratebind123!") | |
// Confirm Button Click | |
val buttonLogin = mDevice.findObject(UiSelector() | |
.instance(0) | |
.className<Button>(Button::class.java!!)) | |
buttonLogin.waitForExists(timeOut) | |
buttonLogin.clickAndWaitForNewWindow() | |
val buttonOk = mDevice.findObject(UiSelector() | |
.instance(1) | |
.className(Button::class.java)) | |
buttonOk.waitForExists(timeOut) | |
buttonOk.click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment