playtender_qualification.robot
28.4 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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
*** Settings ***
Resource playtender_common.robot
Resource playtender_variables.robot
Resource playtender_bid_variables.robot
Resource playtender_qualification_variables.robot
*** Keywords ***
open tender form prequalification
[Arguments] ${qualification_num}
[Documentation] Відкрити форму прекваліфікації і потрібну кваліфікацію під номером qualification_num
run keyword if ${qualification_num} == 0 wait until page contains element with reloading ${prequalification_form_0_open_btn_locator}
run keyword if ${qualification_num} == 0 open popup by btn locator ${prequalification_form_0_open_btn_locator}
run keyword if ${qualification_num} == 1 open popup by btn locator ${prequalification_form_1_open_btn_locator}
run keyword if ${qualification_num} == -1 open popup by btn locator ${prequalification_form_-1_open_btn_locator}
run keyword if ${qualification_num} == -2 wait until page contains element with reloading ${prequalification_form_-2_open_btn_locator}
run keyword if ${qualification_num} == -2 open popup by btn locator ${prequalification_form_-2_open_btn_locator}
# run keyword if ${qualification_num} == -2 execute javascript $('#bids-pjax .pseudo-table__row:last a[href*="/tender/prequalification"]').click()
confirm qualifications
[Documentation] Відкрити форму прекваліфікації і перевести кваліфікацію під номером qualification_num до тендера
... tender_uaid в статус active.
Execute Javascript $('#prequalificationform-decision').val('accept').change()
capture page screenshot
wait until page contains element ${prequalification_form_eligible_input_locator}
capture page screenshot
# click visible element ${prequalification_form_eligible_input_locator}
# click visible element ${prequalification_form_qualified_input_locator}
Execute Javascript $('#prequalificationform-eligible').click()
Execute Javascript $('#prequalificationform-qualified').click()
submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_submit_success_msg} ${tender_created_checker_element_locator}
reject qualifications
[Documentation] Відкрити форму прекваліфікації і перевестикваліфікацію під номером qualification_num до тендера
... tender_uaid в статус unsuccessful.
Execute Javascript $('#prequalificationform-decision').val('decline').change()
capture page screenshot
# wait until page contains element ${qualification_form_reasons_cancellation_input_locator}
# capture page screenshot
# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
Execute Javascript ${prequalification_form_title_cancellation_input_locator}
capture page screenshot
# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
input text to exist visible input ${prequalification_form_description_cancellation_input_locator} GenerateFakeText
capture page screenshot
submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_decline_success_msg} ${tender_created_checker_element_locator}
capture page screenshot
cancel qualifications
[Documentation] Відкрити форму прекваліфікації і перевести кваліфікацію під номером qualification_num до тендера
... tender_uaid в статус cancelled.
wait until page contains element ${prequalification_form_description_cancellation_input_locator}
Execute Javascript $('#prequalificationform-decision').val('cancel').change()
# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
capture page screenshot
wait until page contains element ${prequalification_form_description_cancellation_input_locator}
capture page screenshot
input text to exist visible input ${prequalification_form_description_cancellation_input_locator} GenerateFakeText
capture page screenshot
submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancel_success_msg} ${tender_created_checker_element_locator}
approve the final qualification decision
[Documentation] Перевести тендер tender_uaid в статус active.pre-qualification.stand-still.
wait until alert is visible ${qualification_form_approve_question_msg}
click visible element ${alert_confirm_btn_locator}
wait until alert is visible ${qualification_form_approve_success_msg}
close current visible alert
wait until page does not contain element ${alert_confirm_btn_locator}
# wait until page contains ${qualification_form_approve_question_msg}
# Execute Javascript ${qualification_form_approve_js_submit_btn_locator}
# Wait Until Page Contains ${qualification_form_approve_success_msg} 60
# wait until alert is visible ${qualification_form_approve_success_msg}
# run keyword and ignore error run keyword if condition is not none ${qualification_form_approve_success_msg} close current visible alert
run keyword and ignore error Wait Until Keyword Succeeds 1600 s 20 s Wait For QualificationsPeriodEnd
#qualification
open tender form qualification
[Arguments] ${award_num}
[Documentation] Відкрити форму кваліфікації і потрібну кваліфікацію під номером award_num
run keyword if "${mode}" not in "open_framework" Run Keywords
... run keyword if ${award_num} == 0 wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
... AND run keyword if ${award_num} == 0 open popup by btn locator ${qualification_form_0_open_btn_locator}
##### BOF - TMP #####
... AND run keyword if ${award_num} == 1 open popup by btn locator ${qualification_form_1_open_btn_locator}
... AND run keyword if ${award_num} == -1 open popup by btn locator ${qualification_form_last_open_btn_locator}
... AND run keyword if ${award_num} == 2 open popup by btn locator ${qualification_form_2_open_btn_locator}
... ELSE IF "${mode}" in "open_framework" Run Keywords
... run keyword if ${award_num} == 0 wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
... AND run keyword if ${award_num} == 0 open popup by btn locator ${qualification_form_0_open_btn_locator}
... AND run keyword if ${award_num} == 1 open popup by btn locator ${qualification_form_1_open_btn_locator}
... AND run keyword if ${award_num} == -1 open popup by btn locator ${qualification_form_last_open_btn_locator}
... AND run keyword if ${award_num} == 2 open popup by btn locator ${qualification_form_2_open_btn_locator}
... AND run keyword if ${award_num} == 3 open popup by btn locator ${qualification_form_3_open_btn_locator}
copy file qualification
[Arguments] ${username} ${document} ${award_num}
[Documentation] Завантажити документ, який знаходиться по шляху document до
... постачальника під номером award_num для тендера tender_uaid.
## copy file to another dir to prevent it deleting
${new_doc_name} = Replace String ${document} /tmp/ /tmp/playtender/
Copy File ${document} ${new_doc_name}
Set To Dictionary ${USERS.users['${username}']} qproposal${award_num}_document=${new_doc_name}
confirm award qualification
[Arguments] ${username} ${award_num}
[Documentation] Перевести постачальника під номером award_num для тендера tender_uaid
... в статус active.
Wait Until Page Contains ${popup_opened_content_success_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
wait until element is visible ${qualification_form_submit_btn_locator} 60
# ${doc_isset}= GetDictionaryKeyExist ${USERS.users['${username}']} qproposal${award_num}_document
# ${doc_name}= Run Keyword If ${doc_isset} GetValueFromDictionaryByKey ${USERS.users['${username}']} qproposal${award_num}_document
# ... ELSE create_fake_doc
${file_path} ${file_name} ${file_content} = create_fake_doc
# Execute Javascript ${qualification_form_accept_input_locator}
Execute Javascript $('#qualificationform-decision').val('accept').change()
# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
capture page screenshot
run keyword and ignore error wait until page contains element ${qualification_form_eligible_input_locator}
capture page screenshot
# run keyword and ignore error click visible element ${qualification_form_eligible_input_locator}
# run keyword and ignore error click visible element ${qualification_form_qualified_input_locator}
run keyword and ignore error Execute Javascript $('#qualificationform-qualified').click()
run keyword and ignore error Execute Javascript $('#qualificationform-eligible').click()
choose file ${add_file_to_qualification_form_locator} ${file_path}
wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60
wait until element is visible ${qualification_form_add_document_type_input_locator} 60
# submit current visible popup
Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('winningBid').change()
capture page screenshot
click visible element ${qualification_form_add_document_description_btn_locator}
capture page screenshot
wait until element is visible ${qualification_form_add_document_description_input_locator}
input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
capture page screenshot
click visible element ${qualification_form_add_document_close_description_btn_locator}
capture page screenshot
run keyword and ignore error click visible element ${qualification_ecp_check_input_locator}
capture page screenshot
run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg} ${qualification_form_submit_btn_locator}
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
## run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${None} ${qualification_ecp_form_open_locator}
Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
# click visible element ${qualification_form_submit_btn_locator}
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
wait until element is visible ${qualification_ecp_form_open_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
run keyword and ignore error close current visible alert
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
capture page screenshot
# Wait Until Page Contains ЕЦП/КЕП успішно накладено на рішення, тепер потрібно підтвердити рішення. 60
# click visible element xpath=//div[contains(@class, 'jconfirm')]//*[text()='Закрити']
reject award qualification
[Arguments] ${username} ${award_num}
[Documentation] Перевести постачальника під номером award_num для тендера tender_uaid
... в статус active.
Wait Until Page Contains ${popup_opened_content_success_locator} 60
wait until element is visible ${qualification_form_submit_btn_locator} 60
# wait until popup is visible
${doc_isset} = GetDictionaryKeyExist ${USERS.users['${username}']} qproposal${award_num}_document
# ${doc_name} = Run Keyword If ${doc_isset} GetValueFromDictionaryByKey ${USERS.users['${username}']} qproposal${award_num}_document
# ... ELSE GenerateFakeDocument
${file_path} ${file_name} ${file_content} = create_fake_doc
Execute Javascript $('#qualificationform-decision').val('decline').change()
capture page screenshot
# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
wait until page contains element ${qualification_form_reasons_cancellation_input_locator}
capture page screenshot
Execute Javascript ${qualification_award_form_title_cancellation_input_locator}
capture page screenshot
# input text to exist visible input ${qualification_form_reasons_cancellation_input_locator} GenerateFakeText
input text to exist visible input ${qualification_form_description_cancellation_input_locator} GenerateFakeText
choose file ${add_file_to_qualification_form_locator} ${file_path}
wait until element is visible ${qualification_form_add_document_type_input_locator}
# submit current visible popup
Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content #qualification-documents select[id*="-document_type"]:last').val('winningBid').change()
capture page screenshot
click visible element ${qualification_form_add_document_description_btn_locator}
wait until element is visible ${qualification_form_add_document_description_input_locator}
input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
capture page screenshot
click visible element ${qualification_form_add_document_close_description_btn_locator}
capture page screenshot
submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancell_success_msg}
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
capture page screenshot
reload page
cancel award qualification
[Documentation] Відкрити форму кваліфікації і перевести кваліфікацію під номером qualification_num до тендера
... tender_uaid в статус cancelled.
wait until element is visible ${qualification_form_submit_btn_locator} 60
# Execute Javascript ${qualification_form_cancel_input_locator}
Execute Javascript $('#qualificationform-decision').val('cancel').change()
# select from visible list by label ${tender_form_award_organization_region_id_locator} ${region}
capture page screenshot
run keyword and ignore error wait until page contains element ${qualification_form_description_cancellation_input_locator}
capture page screenshot
run keyword and ignore error Execute Javascript ${qualification_award_form_title_decline_input_locator}
run keyword and ignore error input text to exist visible input ${qualification_form_description_cancellation_input_locator} GenerateFakeText
capture page screenshot
submit form and check result ${qualification_form_submit_btn_locator} ${qualification_form_cancel_success_msg} ${tender_created_checker_element_locator}
#qualification awawd reporting and negotiotion
confirm award
[Arguments] ${document}
[Documentation] Перевести постачальника в статус active.
run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' Wait Until Page Contains ${award_form_negotiation_submit_success_msg} 10
# run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' wait until alert is visible ${award_form_negotiation_submit_success_msg}
run keyword and ignore error run keyword if '${mode}' in 'negotiation reporting' close current visible alert
capture page screenshot
wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
open popup by btn locator ${qualification_form_0_open_btn_locator}
# ${file_path} ${file_name} ${file_content} = create_fake_doc
Execute Javascript $('#qualificationform-decision').val('accept').change()
capture page screenshot
# run keyword and ignore error wait until page contains element ${award_form_qualified_input_locator}
capture page screenshot
run keyword and ignore error click visible element ${award_form_qualified_input_locator}
choose file ${add_file_to_qualification_form_locator} ${document}
# wait until page does not contain element ${popup_dynamic_form_loading_element_locator} 60
wait until element is visible ${qualification_form_add_document_type_input_locator} 60
# submit current visible popup
Run Keyword And Ignore Error Execute Javascript $('.fancybox-is-open .fancybox-content select[id*="-document_type"]:last').val('winningBid').change()
capture page screenshot
click visible element ${qualification_form_add_document_description_btn_locator}
capture page screenshot
wait until element is visible ${qualification_form_add_document_description_input_locator}
input text to exist visible input ${qualification_form_add_document_description_input_locator} test2
capture page screenshot
click visible element ${qualification_form_add_document_close_description_btn_locator}
capture page screenshot
# run keyword and ignore error run keyword if '${mode}' in 'reporting' submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg}
capture page screenshot
# run keyword and ignore error run keyword if '${mode}' in 'reporting' wait until page contains element with reloading ${qualification_form_0_open_btn_locator}
capture page screenshot
# run keyword and ignore error run keyword if '${mode}' in 'reporting' open popup by btn locator ${qualification_form_0_open_btn_locator}
run keyword and ignore error run keyword if '${mode}' in 'reporting' Execute Javascript $('[id$="qualificationform-tender_not_signed_qualification_confirmation_required"]').click()
capture page screenshot
# run keyword and ignore error run keyword if '${mode}' in 'reporting' Execute Javascript $('#qualificationform-decision').val('accept').change()
run keyword and ignore error run keyword if '${mode}' in 'negotiation' Execute Javascript $('[id$="qualificationform-qualified"]').click()
capture page screenshot
run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_form_submit_success_msg} ${qualification_form_submit_btn_locator}
capture page screenshot
run keyword and ignore error click visible element ${qualification_ecp_check_input_locator}
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
# run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${None} ${qualification_ecp_form_open_locator}
Execute Javascript $('.fancybox-is-open .fancybox-content button.btn.btn-success').click()
# click visible element ${qualification_form_submit_btn_locator}
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
wait until element is visible ${qualification_ecp_form_open_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
run keyword and ignore error Load Sign
capture page screenshot
wait until element is visible ${qualification_form_submit_btn_locator} 60
run keyword and ignore error wait until element is visible ${tender_status_active_qualification_value_locator} 10
capture page screenshot
run keyword and ignore error submit form and check result ${qualification_form_submit_btn_locator} ${qualification_award_after_ecp_form_submit_success_msg} ${None}
capture page screenshot
confirm awards
[Documentation] Перевести постачальників для тендера tender_uaid
... в статус active.
wait until page contains element with reloading ${qualification_agreement_form_approve_submit_btn_locator} 720 30
click visible element ${qualification_agreement_form_approve_submit_btn_locator}
wait until page contains ${qualification_agreement_form_approve_question_msg}
Execute Javascript ${qualification_form_approve_js_submit_btn_locator}
Wait Until Page Contains ${qualification_agreement_form_approve_success_msg} 60
wait until alert is visible ${qualification_agreement_form_approve_success_msg}
run keyword and ignore error run keyword if condition is not none ${qualification_agreement_form_approve_success_msg} close current visible alert
Wait Until Keyword Succeeds 800 s 20 s Wait For QualificationsPeriodEnd