Skip to content

Commit 40b302e

Browse files
committed
Do not use deprecated Select Window keyword
1 parent b59955e commit 40b302e

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

atest/acceptance/keywords/click_element_modifier.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ Initialize Page
5353
Element Text Should Be output initial output
5454

5555
Close Popup Window
56-
Select Window myName timeout=5s
56+
Switch Window myName timeout=5s
5757
Close Window
58-
Select Window MAIN timeout=5s
58+
Switch Window MAIN timeout=5s

atest/acceptance/keywords/implicit_wait.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Browser Open With Implicit Wait And Test Wating
1515
Implicit Wait And New Window
1616
${old_value} = Set Selenium Implicit Wait 3
1717
Execute Javascript window.open("about:blank")
18-
Select Window NEW
18+
Switch Window NEW
1919
${start_time} = Get Current Date result_format=epoch exclude_millis=yes
2020
Run Keyword And Ignore Error Wait Until Page Contains Element //not_here 1
2121
${end_time} = Get Current Date result_format=epoch exclude_millis=yes
@@ -25,8 +25,8 @@ Implicit Wait And New Window
2525
Implicit Wait And Back To Main Window
2626
${old_value} = Set Selenium Implicit Wait 3
2727
Execute Javascript window.open("about:blank")
28-
Select Window NEW
29-
Select Window MAIN
28+
Switch Window NEW
29+
Switch Window MAIN
3030
${start_time} = Get Current Date result_format=epoch exclude_millis=yes
3131
Run Keyword And Ignore Error Wait Until Page Contains Element //not_here 1
3232
${end_time} = Get Current Date result_format=epoch exclude_millis=yes

atest/acceptance/keywords/navigation.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ Target Opens in New Window
102102
Cannot Be Executed in IE
103103
Click Link Target opens in new window
104104
Wait Until Keyword Succeeds 5 1 Wait Until Window Is Open
105-
Select Window ${INDEX TITLE}
105+
Switch Window ${INDEX TITLE}
106106
Verify Location Is "index.html"
107-
[Teardown] Run Keyword If Test Passed Run Keywords Close Window Select Window
107+
[Teardown] Run Keyword If Test Passed Run Keywords Close Window Switch Window
108108

109109
*** Keywords ***
110110
Wait Until Window Is Open

atest/acceptance/windows.robot

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Get Window Titles With Non ASCII Title
2626
${exp_titles}= Create List Click link to show a popup window äää
2727
Click Link my popup
2828
Wait Until New Window Is Open
29-
${parent} = Select Window Original
29+
${parent} = Switch Window Original
3030
Click Element unicode
3131
${titles} = Get Window Titles
3232
Should Be Equal ${titles} ${exp_titles}
33-
[Teardown] Select Window ${parent}
33+
[Teardown] Switch Window ${parent}
3434

3535
Get Title
3636
${title} = Get Title
@@ -126,85 +126,85 @@ Select Window By Handle
126126
Cannot Be Executed in IE
127127
Click Link my popup
128128
Wait Until New Window Is Open
129-
${parent}= Select Window Original
129+
${parent}= Switch Window Original
130130
Title Should Be Original
131-
${child}= Select Window ${parent}
131+
${child}= Switch Window ${parent}
132132
Title Should Be Click link to show a popup window
133-
Select Window ${child}
133+
Switch Window ${child}
134134
Close Window
135-
${FromWindow}= Select Window ${parent}
135+
${FromWindow}= Switch Window ${parent}
136136
Title Should Be Click link to show a popup window
137137
Should Be True ${FromWindow} == None
138138

139139
Select Window With Delay By Title
140140
[Tags] Known Issue Internet Explorer
141141
Click Button id:MyButton
142-
Select Window Original timeout=5
142+
Switch Window Original timeout=5
143143
Title Should Be Original
144144
Close Window
145-
Select Window main
145+
Switch Window main
146146
Title Should Be Click link to show a popup window
147147

148148
Select Window With Delay By Title And Window Not Found
149149
[Tags] Known Issue Internet Explorer
150150
Click Button id:MyButton
151151
Run Keyword And Expect Error
152152
... No window matching handle, name, title or URL 'Original' found.
153-
... Select Window Original timeout=0.2
154-
[Teardown] Select Window main
153+
... Switch Window Original timeout=0.2
154+
[Teardown] Switch Window main
155155

156156
Select Popup Window By Excluded List
157157
[Tags] Known Issue Internet Explorer
158158
Cannot Be Executed in IE
159159
@{excluded_handle_list}= Get Window Handles
160160
Click Link my popup
161-
${parent}= Select Window ${excluded_handle_list} timeout=5
161+
${parent}= Switch Window ${excluded_handle_list} timeout=5
162162
Title Should Be Original
163163
Close Window
164-
Select Window ${parent}
164+
Switch Window ${parent}
165165
Title Should Be Click link to show a popup window
166166

167167
Select Popup Window With Delay By Excluded List
168168
[Tags] Known Issue Internet Explorer
169169
@{excluded_handle_list}= Get Window Handles
170170
Click Button id:MyButton
171-
Select Window ${excluded_handle_list} timeout=5
171+
Switch Window ${excluded_handle_list} timeout=5
172172
Title Should Be Original
173173
Close Window
174-
Select Window main
174+
Switch Window main
175175
Title Should Be Click link to show a popup window
176176

177177
Select Window By Special Locator
178178
[Tags] Known Issue Internet Explorer
179179
Cannot Be Executed in IE
180-
${start}= Select Window current
180+
${start}= Switch Window current
181181
Click Link my popup
182-
${parent}= Select Window new timeout=5
182+
${parent}= Switch Window new timeout=5
183183
Title Should Be Original
184184
Should Be True '${start}' == '${parent}'
185185
Close Window
186-
Select Window main
186+
Switch Window main
187187
Title Should Be Click link to show a popup window
188188

189189
Select Window With Delay By Special Locator
190190
[Tags] Known Issue Internet Explorer
191191
Click Button id:MyButton
192-
Select Window new timeout=5
192+
Switch Window new timeout=5
193193
Title Should Be Original
194194
Close Window
195-
Select Window main
195+
Switch Window main
196196
Title Should Be Click link to show a popup window
197197

198198
*** Keywords ***
199199
Open Popup Window, Select It And Verify
200200
[Arguments] ${window_id}
201201
Click Link my popup
202-
Select Window ${window_id} timeout=5
202+
Switch Window ${window_id} timeout=5
203203
Title should Be Original
204204

205205
Select Main Window And Verify
206206
Close Window
207-
Select Window main timeout=5
207+
Switch Window main timeout=5
208208
Title Should Be Click link to show a popup window
209209

210210
Do Action In Popup Window And Verify
@@ -213,7 +213,7 @@ Do Action In Popup Window And Verify
213213

214214
Close Popup Window And Select Main Window By Title
215215
Close Window
216-
Select Window title=Click link to show a popup window
216+
Switch Window title=Click link to show a popup window
217217

218218
Wait Until New Window Is Open
219219
Wait Until Keyword Succeeds 5 1 New Windows Should Be Open

0 commit comments

Comments
 (0)