Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.appiumtest;
- import io.appium.java_client.MobileElement;
- import io.appium.java_client.android.AndroidDriver;
- public class LoginScreen {
- AndroidDriver driver;
- MobileElement loginButton = (MobileElement) driver.findElementById("com.ххх.android.patient:id/login_button");
- MobileElement emailField = (MobileElement) driver.findElementById("com.ххх.android.patient:id/email_text");
- MobileElement passwordField = (MobileElement) driver.findElementById("com.ххх.android.patient:id/password_text");
- public void loginUser(String username, String password) {
- this.loginButton.click();
- this.emailField.sendKeys(username);
- this.passwordField.sendKeys(password);
- this.loginButton.click();
- }
- }
Add Comment
Please, Sign In to add comment