publicbid_claim.robot
27 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
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
*** Settings ***
Resource publicbid_common.robot
Resource publicbid_claim_variables.robot
*** Keywords ***
Створити вимогу
[Arguments] ${username} ${tender_uaid} ${type} ${type_id} ${claim} ${doc_name}
[Documentation] Створити вимогу з claim в описі для тендера tender_uaid.
open tender page by uaid ${tender_uaid}
click visible element ${claim_page_open_btn_locator}
capture page screenshot
wait until page contains element with reloading ${claim_form_open_btn_locator}
open popup by btn locator ${claim_form_open_btn_locator}
capture page screenshot
input text to exist visible input ${claim_form_complaintform_title_input_locator} ${claim.data.title}
capture page screenshot
input text to exist visible input ${claim_form_complaintform_description_input_locator} ${claim.data.description}
capture page screenshot
Run Keyword And Ignore Error Run Keyword If '${type}' == 'tender' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Закупівля
capture page screenshot
Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Лот
capture page screenshot
Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_input_locator}
${claim_form_complaintform_related_lot_select_locator} = Run Keyword If '${type}' == 'lot' replace string ${claim_form_complaintform_related_lot_input_locator_tpl} %type_id% ${type_id}
Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Click Element ${claim_form_complaintform_related_lot_select_locator}
capture page screenshot
Run Keyword And Ignore Error Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Вимога
Run Keyword And Ignore Error Run Keyword If '${type}' == 'winner_complaint' or '${claim.data.type}' == 'complaint' Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Скарга
capture page screenshot
### Run Keyword If '${doc_name}' != 'null' click visible element ${claim_form_complaintform_document_btn_locator}
capture page screenshot
Run Keyword If '${doc_name}' != 'null' choose file ${add_file_to_form_locator} ${doc_name}
capture page screenshot
Run Keyword If '${doc_name}' != 'null' wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
capture page screenshot
# Run Keyword If '${doc_name}' != 'null' submit current visible popup
submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_form_submit_success_msg} ${tender_created_checker_element_locator}
# Функция ожидания claim_uaid_text_locator соответствующей вимоги
# click visible element ${claim_form_open_btn_locator}
reload page
wait until page does not contain element with reloading ${claim_sync_element_locator} 60
wait until page contains element with reloading ${claim_uaid_text_locator}
${return_value}= get text ${claim_uaid_text_locator}
${return_value}= Convert To String ${return_value}
[return] ${return_value}
Скасувати вимогу
[Arguments] ${username} ${tender_uaid} ${complaintID} ${cancellation_data} ${award_index}
[Documentation] Перевести вимогу complaintID для тендера tender_uaid у статус cancelled,
... використовуючи при цьому дані confirmation_data.
open tender page by uaid ${tender_uaid}
click visible element and wait until page contains element ${claim_page_open_btn_locator} ${claim_form_open_btn_locator}
${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID}
wait until page contains element with reloading ${claim_open_form_answer_locator}
${claim_form_cancel_open_btn_locator} = replace string ${claim_form_cancel_open_btn_locator_tpl} %complaint_id% ${complaintID}
wait until page contains element with reloading ${claim_form_cancel_open_btn_locator}
open popup by btn locator ${claim_form_cancel_open_btn_locator}
capture page screenshot
input text to exist visible input ${claim_form_cancellation_reason_input_locator} ${cancellation_data.data.cancellationReason}
capture page screenshot
submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_cancel_submit_success_msg} ${tender_created_checker_element_locator}
get claim information
[Arguments] ${tender_uaid} ${complaintID} ${field_name} ${award_index}=${None}
[Documentation] Отримати значення поля field_name скарги/вимоги complaintID про
... виправлення умов закупівлі/лоту для тендера tender_uaid (скарги/вимоги про
... виправлення визначення переможця під номером award_index, якщо award_index != None).
open tender page by uaid ${tender_uaid}
click visible element ${claim_page_open_btn_locator}
capture page screenshot
${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID}
wait until page contains element with reloading ${claim_open_form_answer_locator}
capture page screenshot
${claim_wrapper_complain_id_value_locator} = set variable ${claim_open_form_answer_locator}
# ${claim_wrapper_complaint_id_value_locator} = replace string ${claim_wrapper_complain_id_value_locator_tpl} %complain_id% ${complaintID}
${claim_description_value_locator} = Run Keyword If 'description' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_description_value_locator}
${claim_title_value_locator} = Run Keyword If 'title' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_title_value_locator}
${claim_complain_id_value_locator} = Run Keyword If 'complaintID' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_complain_id_value_locator}
${claim_status_value_locator} = Run Keyword If 'status' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_status_value_locator}
${claim_resolution_type_value_locator} = Run Keyword If 'resolutionType' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_resolution_type_value_locator}
${claim_resolution_value_locator} = Run Keyword If 'resolution' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_resolution_value_locator}
${claim_satisfied_value_locator} = Run Keyword If 'satisfied' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_satisfied_value_locator}
${claim_related_lot_value_locator} = Run Keyword If 'relatedLot' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_related_lot_value_locator}
${claim_cancellation_reason_value_locator} = Run Keyword If 'cancellationReason' == '${field_name}' set variable ${claim_wrapper_complain_id_value_locator} ${claim_cancellation_reason_value_locator}
Run Keyword If "${TEST_NAME}" == "Можливість відповісти на вимогу про виправлення умов закупівлі" Wait Until Keyword Succeeds 420 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "${TEST_NAME}" == "Можливість відповісти на вимогу про виправлення умов лоту" Wait Until Keyword Succeeds 420 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'answered'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Answered ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "${TEST_NAME}" == "Відображення задоволення вимоги" Wait Until Keyword Succeeds 300 s 15 s Wait For Satisfied ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "${TEST_NAME}" == "Відображення незадоволення вимоги" Wait Until Keyword Succeeds 300 s 15 s Wait For Satisfied ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'resolved'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Resolved ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'cancelled'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Cancelled ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'ignored'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Ignored ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'stopping'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Stopping ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword If "Відображення статусу 'pending'" in "${TEST_NAME}" Wait Until Keyword Succeeds 300 s 15 s Wait For Pending ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword And Ignore Error Run Keyword If "Відображення кінцевих статусів двох останніх вимог" in "${TEST_NAME}" Wait Until Keyword Succeeds 30 s 5 s Wait For Invalid ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword And Ignore Error Run Keyword If "Відображення кінцевих статусів двох останніх вимог" in "${TEST_NAME}" Wait Until Keyword Succeeds 30 s 5 s Wait For Declined ${complaintID} ${claim_wrapper_complain_id_value_locator}
Run Keyword And Return If 'description' == '${field_name}' get value by locator on opened page ${claim_description_value_locator}
Run Keyword And Return If 'complaintID' == '${field_name}' get value by locator on opened page ${claim_complain_id_value_locator}
Run Keyword And Return If 'title' == '${field_name}' get value by locator on opened page ${claim_title_value_locator}
Run Keyword And Return If 'status' == '${field_name}' get value by locator on opened page ${claim_status_value_locator}
Run Keyword And Return If 'resolutionType' == '${field_name}' get value by locator on opened page ${claim_resolution_type_value_locator}
Run Keyword And Return If 'resolution' == '${field_name}' get value by locator on opened page ${claim_resolution_value_locator}
Run Keyword And Return If 'satisfied' == '${field_name}' Отримати інформацію із скарги satisfied ${claim_satisfied_value_locator}
Run Keyword And Return If 'relatedLot' == '${field_name}' get value by locator on opened page ${claim_related_lot_value_locator}
Run Keyword And Return If 'cancellationReason' == '${field_name}' get value by locator on opened page ${claim_cancellation_reason_value_locator}
Отримати інформацію із документа скарги title
[Arguments] ${complaintID} ${doc_id}
[Documentation] Отримати значення поля title з документу з doc_id в описі для скарги для тендера.
click visible element ${claim_page_open_btn_locator}
${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID}
wait until page contains element with reloading ${claim_open_form_answer_locator}
${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID}
# wait until page contains element with reloading ${claim_file_name_input_locator}
${return_value} = get text ${claim_file_name_input_locator}
[return] ${return_value}
get document complaint
[Arguments] ${complaintID} ${doc_id}
[Documentation] Завантажити файл doc_id до скарги complaintID для тендера tender_uaid
... в директорію ${OUTPUT_DIR} для перевірки вмісту цього файлу.
${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID}
wait until page contains element with reloading ${claim_file_name_input_locator}
${claim_file_link_input_locator} = replace string ${claim_file_link_input_locator_tpl} %complain_id% ${complaintID}
${claim_file_name_input_locator} = replace string ${claim_file_name_input_locator_tpl} %complain_id% ${complaintID}
wait until page contains element with reloading ${tender_new_doc_locator}
${file_link} = Execute Javascript ${claim_file_link_input_locator}
${file_name} = get text ${claim_file_name_input_locator}
download_file ${file_link} ${file_name} ${OUTPUT_DIR}
[return] ${file_name}
Підтвердити вирішення вимоги
[Arguments] ${username} ${tender_uaid} ${type} ${type_id} ${complaintID} ${data} ${award_index}
[Documentation] Підтвердити вирішення вимоги
open tender page by uaid ${tender_uaid}
click visible element ${claim_page_open_btn_locator}
click visible element and wait until page contains element ${claim_page_open_btn_locator} ${claim_form_open_btn_locator}
${claim_form_resolved_input_locator} = replace string ${claim_form_resolved_input_locator_tpl} %complaint_id% ${complaintID}
open popup by btn locator ${claim_form_resolved_input_locator}
${value} = Set Variable If '${data.data.satisfied}' Задоволен Не задоволен
run keyword and ignore error select from visible list by label ${claim_form_satisfied_input_locator} ${value}
capture page screenshot
submit form and check result ${claim_form_complaintform_submit_btn_locator} ${claim_form_satisfied_submit_success_msg} ${None}
Відповісти на вимогу
[Arguments] ${username} ${tender_uaid} ${complaintID} ${answer_data} ${award_index}
[Documentation] Відповісти на вимогу complaintID
... для тендера tender_uaid, використовуючи при цьому дані answer_data.
open tender page by uaid ${tender_uaid}
click visible element ${claim_page_open_btn_locator}
${claim_open_form_answer_locator} = replace string ${claim_open_form_answer_btn_locator_tpl} %title% ${complaintID}
wait until page contains element with reloading ${claim_open_form_answer_locator}
${claim_form_open_form_answer_btn_locator} = replace string ${claim_form_open_form_answer_btn_locator_tpl} %title% ${complaintID}
wait until page contains element with reloading ${claim_form_open_form_answer_btn_locator}
open popup by btn locator ${claim_form_open_form_answer_btn_locator}
input text to exist visible input ${claim_form_answer_resolution_value_locator} ${answer_data.data.resolution}
Run Keyword If '${answer_data.data.resolutionType}' == 'resolved' select from list by value ${claim_form_answer_resolution_type_value_locator} resolved
Run Keyword If '${answer_data.data.resolutionType}' == 'declined' select from list by value ${claim_form_answer_resolution_type_value_locator} declined
Run Keyword If '${answer_data.data.resolutionType}' == 'invalid' select from list by value ${claim_form_answer_resolution_type_value_locator} invalid
Run Keyword And Ignore Error input text to exist visible input ${claim_form_answer_tenderer_action_value_locator} ${answer_data.data.tendererAction}
submit form and check result ${claim_form_answer_success_btn_locator} ${claim_form_answer_submit_success_msg}
Wait For Answered
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% answered
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Wait For Satisfied
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_satisfied_value_locator} = replace string ${claim_form_satisfied_value_locator_tpl} %query% Так
${claim_form_satisfied_value_locator_tmp} = set variable ${wrapper} ${claim_form_satisfied_value_locator}
Page Should Contain Element ${claim_form_satisfied_value_locator_tmp}
Wait For Resolved
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_resolved_value_locator} = replace string ${claim_form_status_locator_tpl} %query% resolved
${claim_form_resolved_value_locator_tmp} = set variable ${wrapper} ${claim_form_resolved_value_locator}
Page Should Contain Element ${claim_form_resolved_value_locator_tmp}
Wait For Cancelled
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% cancelled
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Wait For Ignored
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% ignored
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Wait For Stopping
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Answered вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% stopping
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Wait For Pending
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Pending вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% pending
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Отримати інформацію із скарги satisfied
[Arguments] ${wrapper}
[Documentation] Отримати інформацію із скарги satisfied
${return_value} = get value by locator on opened page ${wrapper}
${return_value} = Run Keyword If 'Так' == '${return_value}' Set Variable True
... ELSE Set Variable False
${return_value} = Convert To Boolean ${return_value}
[return] ${return_value}
Wait For Invalid
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу Invalid вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% invalid
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}
Wait For Declined
[Arguments] ${complaintID} ${wrapper}
[Documentation] Очікування статусу declined вимоги complaintID
... для тендера tender_uaid.
Reload Page
${claim_form_status_locator} = replace string ${claim_form_status_locator_tpl} %query% declined
${claim_status_value_locator} = set variable ${wrapper} ${claim_form_status_locator}
Page Should Contain Element ${claim_status_value_locator}