forked from robotframework/SeleniumLibrary
/
content_assertions.txt
219 lines (178 loc) · 11.2 KB
/
content_assertions.txt
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
*** Settings ***
Test Setup Go To Front Page
Default Tags assertions
Resource ../resource.txt
*** Test Cases ***
Location Should Be
[Documentation] LOG 2:2 Current location is '${FRONT PAGE}'.
Location Should Be ${FRONT PAGE}
Run Keyword And Expect Error Location should have been 'non existing' but was '${FRONT PAGE}' Location Should Be non existing
Location Should Contain
[Documentation] LOG 2:2 Current location contains 'html'.
Location Should Contain html
Run Keyword And Expect Error Location should have contained 'not a location' but it was '${FRONT PAGE}'. Location Should Contain not a location
Title Should Be
[Documentation] LOG 2:2 Page title is '(root)/index.html'.
Title Should Be (root)/index.html
Run Keyword And Expect Error Title should have been 'not a title' but was '(root)/index.html' Title Should Be not a title
Page Should Contain
[Documentation] LOG 2:3 Current page contains text 'needle'. LOG 4.1:6 REGEXP: (?i)<html .*</html>
Page Should Contain needle
Page Should Contain This is the haystack
Run Keyword And Expect Error Page should have contained text 'non existing text' but did not Page Should Contain non existing text
Page Should Contain With Custom Log Level
[Documentation] LOG 2.1:6 DEBUG REGEXP: (?i)<html .*</html>
Run Keyword And Expect Error Page should have contained text 'non existing text' but did not Page Should Contain non existing text DEBUG
Page Should Contain With Disabling Source Logging
[Documentation] LOG 3:2 NONE
Set Log Level INFO
Run Keyword And Expect Error Page should have contained text 'non existing text' but did not Page Should Contain non existing text loglevel=NONE
[Teardown] Set Log Level DEBUG
Page Should Contain With Frames
[Setup] Go To Page "frames/frameset.html"
Page Should Contain You're looking at right.
Page Should Not Contain
[Documentation] LOG 2:5 Current page does not contain text 'non existing text'. LOG 3.1:4 REGEXP: (?i)<html .*</html>
Page Should Not Contain non existing text
Run Keyword And Expect Error Page should not have contained text 'needle' Page Should Not Contain needle
Page Should Not Contain With Custom Log Level
[Documentation] LOG 2.1:4 DEBUG REGEXP: (?i)<html .*</html>
Run Keyword And Expect Error Page should not have contained text 'needle' Page Should Not Contain needle DEBUG
Page Should Not Contain With Disabling Source Logging
[Documentation] LOG 3:2 NONE
Set Log Level INFO
Run Keyword And Expect Error Page should not have contained text 'needle' Page Should Not Contain needle loglevel=NONE
[Teardown] Set Log Level DEBUG
Page Should Contain Element
Page Should Contain Element some_id
Run Keyword And Expect Error Page should have contained element 'non-existent' but did not Page Should Contain Element non-existent
Page Should Contain Element With Custom Message
Run Keyword And Expect Error Custom error message Page Should Contain Element invalid Custom error message
Page Should Contain Element With Disabling Source Logging
[Documentation] LOG 3:2 NONE
Set Log Level INFO
Run Keyword And Expect Error Page should have contained element 'non-existent' but did not Page Should Contain Element non-existent loglevel=NONE
[Teardown] Set Log Level DEBUG
Page Should Not Contain Element
Page Should Not Contain Element non-existent
Run Keyword And Expect Error Page should not have contained element 'some_id' Page Should Not Contain Element some_id
Page Should Not Contain Element With Disabling Source Logging
[Documentation] LOG 3:2 NONE
Set Log Level INFO
Run Keyword And Expect Error Page should not have contained element 'some_id' Page Should Not Contain Element some_id loglevel=NONE
[Teardown] Set Log Level DEBUG
Element Should Contain
Element Should Contain some_id This text is inside an identified element
Run Keyword And Expect Error Element 'some_id' should have contained text 'non existing text' but its text was 'This text is inside an identified element'. Element Should Contain some_id non existing text
Elements Should Not Contain
Element Should Contain some_id an identified element
Element Should Not Contain some_id Foo Bar Baz
Run Keyword And Expect Error Element 'some_id' should not have contained text 'an identified element' but its text was 'This text is inside an identified element'. Element Should Not Contain some_id an identified element
Element Text Should Be
Element Text Should Be some_id This text is inside an identified element
Run Keyword And Expect Error The text of element 'some_id' should have been 'inside' but in fact it was 'This text is inside an identified element'. Element Text Should Be some_id inside
Element Should Be Visible
[Setup] Go To Page "visibility.html"
Element Should Be Visible i_am_visible
Run Keyword And Expect Error The element 'i_am_hidden' should be visible, but it is not. Element Should Be Visible i_am_hidden
Element Should Not Be Visible
[Setup] Go To Page "visibility.html"
Element Should Not Be Visible i_am_hidden
Run Keyword And Expect Error The element 'i_am_visible' should not be visible, but it is. Element Should Not Be Visible i_am_visible
Page Should Contain Checkbox
[Documentation] LOG 2:3 Current page contains checkbox 'can_send_email'.
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Contain Checkbox can_send_email
Page Should Contain Checkbox xpath=//input[@type='checkbox' and @name='can_send_sms']
Run Keyword And Expect Error Page should have contained checkbox 'non-existing' but did not Page Should Contain Checkbox non-existing
Page Should Not Contain Checkbox
[Documentation] LOG 2:3 Current page does not contain checkbox 'non-existing'.
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Not Contain Checkbox non-existing
Run Keyword And Expect Error Page should not have contained checkbox 'can_send_email' Page Should Not Contain Checkbox can_send_email
Page Should Contain Radio Button
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Contain Radio Button sex
Page Should Contain Radio Button xpath=//input[@type="radio" and @value="male"]
Run Keyword And Expect Error Page should have contained radio button 'non-existing' but did not Page Should Contain Radio Button non-existing
Page Should Not Contain Radio Button
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Not Contain Radio Button non-existing
Run Keyword And Expect Error Page should not have contained radio button 'sex' Page Should Not Contain Radio Button sex
Page Should Contain Image
[Setup] Go To Page "links.html"
Page Should contain Image image.jpg
Run Keyword And Expect Error Page should have contained image 'non-existent' but did not Page Should contain Image non-existent
Page Should Not Contain Image
[Setup] Go To Page "links.html"
Page Should not contain Image non-existent
Run Keyword And Expect Error Page should not have contained image 'image.jpg' Page Should not contain Image image.jpg
Page Should Contain Link
[Setup] Go To Page "links.html"
Page Should contain link Relative
Page Should contain link sub/index.html
Run Keyword And Expect Error Page should have contained link 'non-existent' but did not Page Should contain link non-existent
Page Should Not Contain Link
[Setup] Go To Page "links.html"
Page Should not contain link non-existent
Run Keyword And Expect Error Page should not have contained link 'Relative' Page Should not contain link Relative
Page Should Contain List
[Setup] Go To Page "forms/prefilled_email_form.html"
Page should Contain List possible_channels
Run Keyword And Expect Error Page should have contained list 'non-existing' but did not Page Should Contain List non-existing
Page Should Not Contain List
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Not Contain List non-existing
Run Keyword And Expect Error Page should not have contained list 'possible_channels' Page Should Not Contain List possible_channels
Page Should Contain TextField
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Contain Text Field name
Page Should Contain Text Field xpath=//input[@type='text' and @name='email']
Run Keyword And Expect Error Page should have contained text field 'non-existing' but did not Page Should Contain Text Field non-existing
Page Should Not Contain Text Field
[Setup] Go To Page "forms/prefilled_email_form.html"
Page Should Not Contain Text Field non-existing
Run Keyword And Expect Error Page should not have contained text field 'name' Page Should Not Contain Text Field name
TextField Should Contain
[Documentation] LOG 2:4 Text field 'name' contains text ''.
[Setup] Go To Page "forms/email_form.html"
TextField Should contain name ${EMPTY}
Input Text name my name
TextField Should contain name my name
Run Keyword And Expect Error Text field 'name' should have contained text 'non-existing' but it contained 'my name' TextField Should contain name non-existing
TextField Value Should Be
[Documentation] LOG 2:4 Content of text field 'name' is ''.
[Setup] Go To Page "forms/email_form.html"
textfield Value Should Be name ${EMPTY}
Input Text name my name
textfield Value Should Be name my name
Run Keyword And Expect Error Value of text field 'name' should have been 'non-existing' but was 'my name' textfield Value Should Be name non-existing
Page Should Contain Button
[Setup] Go To Page "forms/buttons.html"
Page Should Contain Button button
Page Should Contain Button Sisään
Page Should Contain Button Get In
Page Should Contain Button xpath=//button[@type="submit"]
Page Should Contain Button Ulos
Page Should Contain Button xpath=//input[@type="submit"]
Page Should Contain Button Act!
Page Should Contain Button xpath=//input[@type="button"]
Run Keyword And Expect Error Page should have contained button 'non-existing' but did not Page Should Contain Button non-existing
Page Should Not Contain Button In Button Tag
[Setup] Go To Page "forms/buttons.html"
Page Should Not Contain Button invalid
Run Keyword And Expect Error Page should not have contained button 'button' Page Should Not Contain Button button
Page Should Not Contain Button In Input Tag
[Setup] Go To Page "forms/buttons.html"
Page Should Not Contain Button invalid
Run Keyword And Expect Error Page should not have contained input 'Act!' Page Should Not Contain Button Act!
Get All Links
[Setup] Go To Page "links.html"
${links}= Get All Links
Length Should Be ${links} 19
List Should Contain Value ${links} bold_id
Xpath Should Match X Times
[Setup] Go To Page "forms/login.html"
Xpath Should Match X Times //input[@type="text"] 1
Xpath Should Match X Times //input[@type="text"] ${1}
Run Keyword And Expect Error Xpath //input[@type="text"] should have matched 2 times but matched 1 times Xpath Should Match X Times //input[@type="text"] 2