-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathresource.robot
More file actions
78 lines (61 loc) · 2.33 KB
/
resource.robot
File metadata and controls
78 lines (61 loc) · 2.33 KB
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
# set up the tests
*** Settings ***
Documentation Define keywords and variables and import MailSlurp functions
Library SeleniumLibrary
Library ./MailSlurp.py ${MAILSLURP_API_KEY}
# define variables and default values
*** Variables ***
${MAILSLURP_API_KEY} PUT_YOUR_KEY_HERE
${SERVER} playground.mailslurp.com
${BROWSER} Firefox
${DELAY} 0
${PLAYGROUND URL} https://${SERVER}/
${TEST_PASSWORD} test-password
# see https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html for selenium keywords
*** Keywords ***
Create Email Address
${inbox} Create Inbox
[Return] ${inbox}
Wait For Confirmation Code
[Arguments] ${inbox_id}
${email} Wait For Latest Email ${inbox_id}
${code} Extract Email Content ${email.body}
[Return] ${code}
Open Browser To Home Page
Open Browser ${PLAYGROUND URL} ${BROWSER}
Maximize Browser Window
Set Selenium Speed ${DELAY}
Home Page Should Be Open
Home Page Should Be Open
Title Should Be React App
SignUp Page Should Be Open
Wait Until Element Contains //*[@data-test="sign-up-header-section"]//span Sign Up
Go To SignUp Page
Go To ${PLAYGROUND URL}
Home Page Should Be Open
Click Element //a[@data-test="sign-in-create-account-link"]
SignUp Page Should Be Open
Input Email
[Arguments] ${username}
Input Text //*[@name="email"] ${username}
Input Username
[Arguments] ${username}
Input Text //*[@name="username"] ${username}
Input Password
[Arguments] ${password}
Input Text //*[@name="password"] ${password}
Input Confirmation
[Arguments] ${code}
Input Text //*[@name="code"] ${code}
Submit Confirmation
Click Button //button[@data-test="confirm-sign-up-confirm-button"]
Submit Credentials
Click Button //button[@data-test="sign-up-create-account-button"]
Submit Login
Click Button //button[@data-test="sign-in-sign-in-button"]
Confirm Page Should Be Open
Wait Until Element Contains //*[@data-test="confirm-sign-up-header-section"]//span Confirm
SignIn Page Should Be Open
Wait Until Element Contains //*[@data-test="sign-in-header-section"]//span Sign in to your account
User Page Should Be Open
Wait Until Page Contains Welcome