-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid.robot
79 lines (62 loc) · 4.17 KB
/
android.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Configurações Android
*** Settings ***
Library AppiumLibrary
*** Variables ***
${REMOTE_URL} http://192.168.0.249:4723
${platformName} Android
${appium:platformVersion} 13
${appium:deviceName} Pixel 4 API 33
${appium:automationName} UiAutomator2
${appium:appPackage} com.example.vamsi.login
${appium:appActivity} com.example.vamsi.login.MainActivity
${appium:newCommandTimeout} 3600
${USUARIO_VALIDO} usuario_valido
${USUARIO_INVALIDO} usuario invalido
${EMAIL_VALIDO} email-valido@teste.com
${EMAIL_INVALIDO} email-invalido@teste.com
${SENHA_VALIDA} senha1234
${SENHA_INVALIDA} senha4567
${TELEFONE} 11 91234-5678
*** Keywords ***
Abrir App
Open Application ${REMOTE_URL} platformName=${platformName} appium:platformVersion=${appium:platformVersion} appium:deviceName=${appium:deviceName} appium:automationName=${appium:automationName} appium:appPackage=${appium:appPackage} appium:appActivity=${appium:appActivity} appium:newCommandTimeout=${appium:newCommandTimeout}
Fechar App
Close Application
Cadastrar Usuario
Click Element id=com.example.vamsi.login:id/tvRegister
Wait Until Element Is Visible id=com.example.vamsi.login:id/etRegName
Click Element id=com.example.vamsi.login:id/etRegName
Input Text id=com.example.vamsi.login:id/etRegName ${USUARIO_VALIDO}
Input Text id=com.example.vamsi.login:id/etRegPhone ${TELEFONE}
Input Text id=com.example.vamsi.login:id/etRegGmail ${EMAIL_VALIDO}
Click Element id=com.example.vamsi.login:id/btnRegLogin
Input Text id=com.example.vamsi.login:id/etRegPassword ${SENHA_VALIDA}
Click Element id=com.example.vamsi.login:id/btnRegLogin
Hide Keyboard
Login Usuario Valido
Wait Until Element Is Visible id=com.example.vamsi.login:id/btnGotoLogin
Click Element id=com.example.vamsi.login:id/btnGotoLogin
Wait Until Element Is Visible id=com.example.vamsi.login:id/etLogGmail
Input Text id=com.example.vamsi.login:id/etLogGmail ${EMAIL_VALIDO}
Input Text id=com.example.vamsi.login:id/etLoginPassword ${SENHA_VALIDA}
Click Element id=com.example.vamsi.login:id/btnLogin
Wait Until Element Is Visible xpath=/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.TextView
Go Back
Login Usuario Invalido
Wait Until Element Is Visible id=com.example.vamsi.login:id/etLogGmail
Input Text id=com.example.vamsi.login:id/etLogGmail ${EMAIL_INVALIDO}
Input Text id=com.example.vamsi.login:id/etLoginPassword ${SENHA_VALIDA}
Click Element id=com.example.vamsi.login:id/btnLogin
#Wait Until Element Is Visible xpath=/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.TextView
Login Senha Invalida
Wait Until Element Is Visible id=com.example.vamsi.login:id/etLogGmail
Input Text id=com.example.vamsi.login:id/etLogGmail ${EMAIL_VALIDO}
Input Text id=com.example.vamsi.login:id/etLoginPassword ${SENHA_INVALIDA}
Click Element id=com.example.vamsi.login:id/btnLogin
#Wait Until Element Is Visible xpath=/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.TextView
Login Invalido
Wait Until Element Is Visible id=com.example.vamsi.login:id/etLogGmail
Input Text id=com.example.vamsi.login:id/etLogGmail ${EMAIL_INVALIDO}
Input Text id=com.example.vamsi.login:id/etLoginPassword ${SENHA_INVALIDA}
Click Element id=com.example.vamsi.login:id/btnLogin
#Wait Until Element Is Visible xpath=/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.TextView