-
Notifications
You must be signed in to change notification settings - Fork 785
Expand file tree
/
Copy pathtextfields.robot
More file actions
90 lines (81 loc) · 3.75 KB
/
textfields.robot
File metadata and controls
90 lines (81 loc) · 3.75 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
79
80
81
82
83
84
85
86
87
88
89
90
*** Settings ***
Suite Setup Open Browser To Start Page Disabling Chrome Leaked Password Detection
Test Setup Go To Page "forms/prefilled_email_form.html"
Resource ../resource.robot
Force Tags Known Issue Internet Explorer
*** Test Cases ***
Get Value From Text Field
${text} = Get Value name
Should Be Equal ${text} Prefilled Name
Clear Element Text name
${text} = Get Value name
Should Be Equal ${text} ${EMPTY}
Input Text and Input Password
[Documentation]
... LOG 1 Typing text 'username' into text field 'username_field'.
... LOG 2 Typing password into text field 'password_field'.
[Setup] Go To Page "forms/login.html"
Input Text username_field username
Input Password password_field password
${username} = Get Value username_field
${password} = Get Value password_field
Should Be Equal ${username} username
Should Be Equal ${password} password
Submit Form
Verify Location Is "forms/submit.html"
Input Password Should Not Log Password String
[Tags] NoGrid
[Setup] Go To Page "forms/login.html"
[Documentation]
... LOG 1:1 INFO Typing password into text field 'password_field'.
... LOG 1:2 DEBUG STARTS: POST http
... LOG 1:3 DEBUG STARTS: http
... LOG 1:4 DEBUG STARTS: Remote response
... LOG 1:5 DEBUG Finished Request
... LOG 1:6 DEBUG STARTS: POST http
... LOG 1:7 DEBUG STARTS: http
... LOG 1:8 DEBUG STARTS: Remote response
... LOG 1:9 DEBUG Finished Request
... LOG 1:10 INFO Temporally setting log level to: NONE
... LOG 1:11 ANY Log level changed from NONE to DEBUG.
... LOG 1:12 NONE
... LOG 2:1 INFO Typing text 'username' into text field 'username_field'.
Input Password password_field password
Input Text username_field username
Input Text and Input Password No Clear
[Setup] Go To Page "forms/login.html"
Input Text username_field user clear=False
Input Password password_field pass False
Input Text username_field name clear=False
Input Password password_field word False
${username} = Get Value username_field
${password} = Get Value password_field
Should Be Equal ${username} username
Should Be Equal ${password} password
Input Non-ASCII Text
[Documentation]
... LOG 1 Typing text 'Yrjö Ärje' into text field 'name'.
Input Text name Yrjö Ärje
${text} = Get Value name
Should Be Equal ${text} Yrjö Ärje
Press Key
[Setup] Go To Page "forms/login.html"
Cannot Be Executed in IE
Press Key username_field James Bon
Press Key username_field \\100
Textfield Value Should Be username_field James Bond
Press Key password_field f
Press Key login_button \\10
Verify Location Is "forms/submit.html"
Attempt Clear Element Text On Non-Editable Field
Run Keyword And Expect Error * Clear Element Text can_send_email
*** Keywords ***
Open Browser To Start Page Disabling Chrome Leaked Password Detection
[Arguments] ${alias}=${None}
${browser}= Evaluate "${BROWSER}".replace(" ", "").lower()
IF "${browser}" in ["chrome", "googlechrome", "gc", "headlesschrome"]
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL}
... options=add_experimental_option("prefs", {"profile.password_manager_leak_detection": False}) alias=${alias}
ELSE
Open Browser ${FRONT PAGE} ${BROWSER} remote_url=${REMOTE_URL} alias=${alias}
END