11*** Settings ***
22Documentation Can be deleted when minimum Selenium version 4.0
33Library SeleniumLibrary event_firing_webdriver=${event_firing_or_none }
4+ Library ../../resources/testlibs/ctrl_or_command.py
45Resource resource_event_firing_webdriver.robot
56Force Tags NoGrid
67Suite Setup Open Browser ${FRONT PAGE } ${BROWSER } alias=event_firing_webdriver
@@ -9,6 +10,7 @@ Suite Teardown Close All Browsers
910
1011*** Variables ***
1112${event_firing_or_none } ${NONE }
13+ ${CTRL_OR_COMMAND } ${EMPTY }
1214
1315*** Test Cases ***
1416Selenium move_to workaround Click Element At Coordinates
@@ -99,9 +101,176 @@ Mouse Down On Link
99101 Text Field Should Contain textfield onmousedown
100102 Mouse Up link_mousedown
101103
104+ Press Keys Normal Keys
105+ [Setup] Go To Page "forms/input_special_keys.html"
106+ Press Keys text_field AAAAA
107+ Click Button OK
108+ Wait Until Page Contains AAAAA
109+
110+ Press Keys Normal Keys Many Times
111+ [Setup] Go To Page "forms/input_special_keys.html"
112+ Press Keys text_field AAAAA+BBB
113+ Click Button OK
114+ Wait Until Page Contains AAAAABBB
115+
116+ Press Keys Sends c++
117+ [Setup] Go To Page "forms/input_special_keys.html"
118+ Press Keys text_field c++
119+ Click Button OK
120+ Wait Until Page Contains c+
121+
122+ Press Keys Normal Keys Many Arguments
123+ [Setup] Go To Page "forms/input_special_keys.html"
124+ Press Keys text_field ccc DDDD
125+ Click Button OK
126+ Wait Until Page Contains cccDDDD
127+
128+ Press Keys Normal Keys Many Times With Many Args
129+ [Setup] Go To Page "forms/input_special_keys.html"
130+ Press Keys text_field a+b C+D
131+ Click Button OK
132+ Wait Until Page Contains abCD
133+
134+ Press Keys Special Keys SHIFT
135+ [Setup] Go To Page "forms/input_special_keys.html"
136+ Press Keys text_field SHIFT+cc
137+ Click Button OK
138+ Wait Until Page Contains CC
139+
140+ Press Keys Special Keys SHIFT Many Times
141+ [Setup] Go To Page "forms/input_special_keys.html"
142+ Press Keys text_field SHIFT+cc SHIFT+dd
143+ Click Button OK
144+ Wait Until Page Contains CCDD timeout=3
145+
146+ Press Keys To Multiple Elements
147+ [Documentation] The | Press Keys | OK | ENTER | presses OK button two times, because
148+ ... Selenium sets the focus to element by clicking the element.
149+ [Setup] Go To Page "forms/input_special_keys.html"
150+ Press Keys text_field tidii
151+ Press Keys OK ENTER
152+ Press Keys None ENTER ENTER
153+ Wait Until Page Contains tidii timeout=3
154+ Page Should Contain Element //p[text()="tidii"] limit=4
155+
156+ Press Keys ASCII Code Send As Is
157+ [Setup] Go To Page "forms/input_special_keys.html"
158+ Press Keys text_field \\108 \\13
159+ Click Button OK
160+ Wait Until Page Contains \\108\\13 timeout=3
161+
162+ Press Keys With Scandic Letters
163+ [Setup] Go To Page "forms/input_special_keys.html"
164+ Press Keys text_field ÖÄÖÄÖ ÅÖÄP
165+ Click Button OK
166+ Wait Until Page Contains ÖÄÖÄÖÅÖÄP timeout=3
167+
168+ Press Keys With Asian Text
169+ [Setup] Go To Page "forms/input_special_keys.html"
170+ Press Keys text_field 田中さんにあげ+て下 さい
171+ Click Button OK
172+ Wait Until Page Contains 田中さんにあげて下さい timeout=3
173+
174+ Press Keys Element Not Found
175+ [Setup] Go To Page "forms/input_special_keys.html"
176+ Run Keyword And Expect Error
177+ ... Element with locator 'not_here' not found.
178+ ... Press Keys not_here YYYY
179+
180+ Press Keys No keys Argument
181+ [Setup] Go To Page "forms/input_special_keys.html"
182+ Run Keyword And Expect Error
183+ ... "keys" argument can not be empty.
184+ ... Press Keys text_field
185+
186+ Press Keys Without Element
187+ [Setup] Go To Page "forms/input_special_keys.html"
188+ Click Element text_field
189+ Press Keys None tidii
190+ Click Button OK
191+ Wait Until Page Contains tidii timeout=3
192+
193+ Press Keys Multiple Times Without Element
194+ [Setup] Go To Page "forms/input_special_keys.html"
195+ Click Element text_field
196+ Press Keys None foo+bar e+n+d
197+ Click Button OK
198+ Wait Until Page Contains foobarend timeout=3
199+
200+ Press Keys Without Element Special Keys
201+ [Setup] Go To Page "forms/input_special_keys.html"
202+ Click Element text_field
203+ Press Keys None ${CTRL_OR_COMMAND } +A ${CTRL_OR_COMMAND } +v
204+ Click Button OK
205+ Wait Until Page Contains Please input text and click the button. Text will appear in the page. timeout=3
206+
207+ Click Element Modifier CTRL
208+ [Setup] Initialize Page For Click Element With Modifier
209+ Click Element Button modifier=CTRL
210+ Element Text Should Be output CTRL click
211+
212+ Click Link Modifier CTRL
213+ [Setup] Initialize Page For Click Element With Modifier
214+ Click Link link text modifier=CTRL
215+ Element Text Should Be output CTRL click
216+ [Teardown] Close Popup Window
217+
218+ Click Button Modifier CTRL
219+ [Setup] Initialize Page For Click Element With Modifier
220+ Click Button Click me! modifier=CTRL
221+ Element Text Should Be output CTRL click
222+
223+ Click Image Modifier CTRL
224+ [Setup] Initialize Page For Click Element With Modifier
225+ Click Image robot modifier=CTRL
226+ Element Text Should Be output CTRL click
227+
228+ Click Element Modifier ALT
229+ [Setup] Initialize Page For Click Element With Modifier
230+ Click Element Button alt
231+ Element Text Should Be output ALT click
232+
233+ Click Element Modifier Shift
234+ [Setup] Initialize Page For Click Element With Modifier
235+ Click Element Button Shift
236+ Element Text Should Be output Shift click
237+
238+ Click Element Modifier CTRL+Shift
239+ [Setup] Initialize Page For Click Element With Modifier
240+ Click Element Button modifier=CTRL+Shift
241+ Element Text Should Be output CTRL and Shift click
242+
243+ Click Element No Modifier
244+ [Setup] Initialize Page For Click Element With Modifier
245+ Click Element Button modifier=False
246+ Element Text Should Be output Normal click
247+
248+ Click Element Wrong Modifier
249+ [Setup] Initialize Page For Click Element With Modifier
250+ Run Keyword And Expect Error
251+ ... ValueError: 'FOOBAR' modifier does not match to Selenium Keys
252+ ... Click Element Button Foobar
253+
254+ Click Element Action Chain and modifier
255+ [Documentation] LOG 2:1 INFO Clicking element 'Button' with CTRL.
256+ [Setup] Initialize Page For Click Element With Modifier
257+ Click Element Button modifier=CTRL action_chain=True
258+ Element Text Should Be output CTRL click
259+
102260*** Keywords ***
103261Initialize Page For Click Element
104262 [Documentation] Initialize Page
105263 Go To Page "javascript/click.html"
106264 Reload Page
107265 Element Text Should Be output initial output
266+
267+ Initialize Page For Click Element With Modifier
268+ [Documentation] Initialize Page
269+ Go To Page "javascript/click_modifier.html"
270+ Reload Page
271+ Element Text Should Be output initial output
272+
273+ Close Popup Window
274+ Switch Window myName timeout=5s
275+ Close Window
276+ Switch Window MAIN timeout=5s
0 commit comments