playtender_bid.robot 42.6 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 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
*** Settings ***

Resource                                                        playtender_common.robot
Resource                                                        playtender_variables.robot
Resource                                                        playtender_bid_variables.robot

*** Keywords ***


fill bid form
    [Arguments]                                                 ${tender_uaid}  ${bid}  ${lots_ids}  ${features_ids}
    [Documentation]                                             Подати цінову пропозицію bid для тендера tender_uaid на лоти lots_ids (якщо lots_ids != None) з неціновими показниками features_ids (якщо features_ids != None).

    submit form and check result                                ${bid_form_refresh_btn_locator}  ${bid_form_refresh_success_msg}  ${tender_created_checker_element_locator}  ${true}
    open popup by btn locator                                   ${bid_form_open_btn_locator}  ${bid_popup_locator}
    ${value} =                                                  get from dictionary by keys  ${bid.data}  value  amount
#    ${amount} =                                                 run keyword if condition is not none  ${value}  convert_float_to_string  ${bid.data.value.amount}
    run keyword if condition is not none                        ${value}  input number to exist visible input   ${bid_form_value_amount_input_locator}  ${value}
    capture page screenshot
#    ${lots} =                                                   get from dictionary by keys  ${data}  lots
    run keyword if condition is not none                        ${lots_ids}  fill bid form lots  ${bid}  ${lots_ids}  ${features_ids}
    capture page screenshot
#    run keyword if condition is none                            ${lots_ids}  fill bid form whithout lots  ${bid}
#    ${features} =                                               get from dictionary by keys  ${data}  features
#    run keyword if condition is not none                        ${features_ids}  fill bid form features  ${bid}  ${tender_form_general_panel_add_feature_btn_locator}
    run keyword if                                              '${mode}' in 'framework_selection'  close current visible alert
    run keyword if                                              '${mode}' not in 'framework_selection'  fill bid required documents_all
    capture page screenshot
    run keyword if                                              '${mode}' == 'openua' or '${mode}' in 'openeu open_competitive_dialogue open_esco open_framework'  fill bid form criterias                                     ${bid}
##    submit form and check result                                ${bid_form_submit_btn_locator}  ${bid_form_submit_success_msg}  ${tender_created_checker_element_locator}

fill bid form lots
    [Arguments]                                                 ${bid}  ${lots_ids}=${None}  ${features_ids}=${None}
    [Documentation]                                             Заповнити лотову цінову пропозицію bid для тендера tender_uaid на лоти lots_ids з неціновими показниками features_ids (якщо features_ids != None).

    ${lots} =                                                   get from dictionary by keys  ${bid.data}  lotValues
    ${lots_length} =                                            Get Length  ${lots}
    : FOR  ${INDEX}  IN RANGE  0  ${lots_length}
    \  Run Keyword And Ignore Error                             run keyword if condition is not none  ${lots}  input number to exist visible input   ${bid_form_value_amount_input_locator}  ${lots[${INDEX}].value.amount}
    \  capture page screenshot
    \  ${self_qualified} =                                      get from dictionary by keys  ${bid.data}  selfQualified
#    \  run keyword if condition is not none                     ${self_qualified}  click visible element  ${bid_form_value_self_qualified_input_locator}
    \  run keyword if condition is not none                     ${self_qualified}  execute javascript    $('.fancybox-is-open .fancybox-content input[id*="-self_qualified"]').click()
    \  capture page screenshot
    \  ${self_eligible} =                                       get from dictionary by keys  ${bid.data}  selfEligible
#    \  run keyword if condition is not none                     ${self_eligible}  click visible element  ${bid_form_value_self_eligible_input_locator}
    \  run keyword if condition is not none                     ${self_eligible}  execute javascript     $('.fancybox-is-open .fancybox-content input[id*="-self_eligible"]').click()
    \  capture page screenshot
    \  ${feature_id} =                                          get from dictionary by keys  ${bid.data}  parameters
    \  run keyword if condition is not none                     ${feature_id}  fill bid form features  ${feature_id}
    \  capture page screenshot
    \  run keyword if                                           '${mode}' in 'open_esco'  fill bid form lots Esco  ${bid.data.lotValues}
    \  run keyword if                                           '${mode}' not in 'openua_defense open_simple_defense' or '${mode}' == 'openua'  Run Keyword And Ignore Error                             execute javascript    $('.fancybox-is-open .fancybox-content input[id*="-self_eligible"]').click()
    \  capture page screenshot

fill bid form features
    [Arguments]                                                 ${bid_parameters}
    [Documentation]                                             Заповнити нецінові показники цінової пропозиції.

    log many  ${bid_parameters}
    ${features_length} =                                        Get Length  ${bid_parameters}
    : FOR  ${INDEX}  IN RANGE  0  ${features_length}
    \  ${bid_form_feature_input_locator}                        replace string  ${bid_form_feature_input_locator_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${bid_form_get_feature_input_locator}                    replace string  ${bid_form_get_feature_input_locator_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${bid_form_feature_input_locator_select}                 replace string  ${bid_form_feature_input_locator_select_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${value_enum} =                                          convert float to string  ${bid_parameters[${INDEX}]['value']}
    \  ${bid_form_feature_value_input_locator}                  set variable  ${bid_form_feature_input_locator} ${bid_form_feature_value_input_locator_tpl}
    \  ${bid_form_get_feature_value_input_locator}              set variable  ${bid_form_get_feature_input_locator} ${bid_form_get_feature_value_input_locator_tpl}
    \  ${bid_form_feature_value_input_locator}                  replace string  ${bid_form_feature_value_input_locator}  _  ' '
    \  ${bid_form_get_feature_value_input_locator}              replace string  ${bid_form_get_feature_value_input_locator}  _  ' '
    \  ${bid_form_feature_value_input_locator}                  replace string  ${bid_form_feature_value_input_locator}  %value%  ${value_enum}
    \  ${bid_form_get_feature_value_input_locator}              replace string  ${bid_form_get_feature_value_input_locator}  %value%  ${value_enum}
    \  ${enum_val}                                              set variable  ${bid_form_get_feature_value_input_locator}
    \  ${enum_val1}=                                            run keyword if  ${bid_parameters[${INDEX}]['value']} == 0  Execute Javascript   return $('[data-weight-source="0"]').text()
    \  ...  ELSE                                                Execute Javascript    ${enum_val}
    \  capture page screenshot
    \  Run Keyword And Ignore Error                             select from list by label  ${bid_form_feature_input_locator_select}  ${enum_val1}
    \  capture page screenshot

fill bid form lots Esco
    [Arguments]                                                 ${values}
    [Documentation]                                             Заповнити цінову пропозицію Esco

    log many  ${values}
    ${values_length} =                                          Get Length  ${values}
    : FOR  ${INDEX}  IN RANGE  0  ${values_length}
    \  input number to exist visible input                      ${bid_form_value_yearly_payments_percentage_input_locator}  ${values[${INDEX}].value.yearlyPaymentsPercentage}
    \  capture page screenshot
    \  input text to exist visible input                        ${bid_form_value_contract_duration_years_input_locator}  ${values[${INDEX}].value.contractDuration.years}
    \  capture page screenshot
    \  input text to exist visible input                        ${bid_form_value_contract_duration_days_input_locator}  ${values[${INDEX}].value.contractDuration.days}
    \  capture page screenshot
    \  fill bid form lots Esco AnnualCostsReduction             ${values[${INDEX}].value.annualCostsReduction}
    \  capture page screenshot

fill bid form lots Esco AnnualCostsReduction
    [Arguments]                                                 ${values}
    [Documentation]                                             Заповнити цінову пропозицію Esco (параметр AnnualCostsReduction).

    ${input_index} =                                            set variable  1
    : FOR  ${value}  IN  @{values}
    \  ${input_index_tmp}=  convert to string  ${input_index}
    \  ${bid_form_value_annual_costs_reduction_input_locator}  replace string  ${bid_form_value_annual_costs_reduction_input_locator_tpl}  %index%  ${input_index_tmp}
    \  input number to exist visible input                     ${bid_form_value_annual_costs_reduction_input_locator}  ${value}
    \  ${input_index} =                                        evaluate  ${input_index} + 1

fill bid required documents_all
    [Arguments]
    [Documentation]                                             Додати фейковий документ до цінової пропозиції при створенні.

    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
#    click visible element and wait until page contains element   ${open_form_add_doc_lot_btn_locator}   jquery=.modal.modal-form.js-form-popup.fancybox-content
    #click visible element                                       ${bid_form_add_document_all_btn_locator}
    capture page screenshot
###    execute javascript                                          $('.fancybox-is-open .fancybox-content .field-bidform-documents .js-upload-documents input[type$="file"]:first').click()
    capture page screenshot
    choose file                                                 ${add_file_to_bid_form_locator}  ${file_path}
    capture page screenshot
    sleep  10
    wait until element is visible                               ${bid_form_add_document_type_input_locator}
#    submit current visible popup
    Run Keyword And Ignore Error                                Select From List By Value  ${bid_form_add_document_type_input_locator}  qualificationDocuments
    click visible element                                       ${bid_form_add_document_description_btn_locator}
    capture page screenshot
    wait until element is visible                               ${bid_form_add_document_description_input_locator}
    input text to exist visible input                           ${bid_form_add_document_description_input_locator}  test2
    click visible element                                       ${bid_form_add_document_close_description_btn_locator}
    capture page screenshot

fill bid form edit
    [Arguments]                                                 ${fieldname}  ${fieldvalue}
    [Documentation]                                             Змінити поле fieldname на fieldvalue цінової пропозиції користувача username для тендера tender_uaid.

    open popup by btn locator                                   ${bid_form_open_btn_locator}  ${bid_popup_locator}
    Run Keyword If                                              '${fieldname}' == 'lotValues[0].value.amount' or '${fieldname}' == 'value.amount' and '${mode}' != 'open_esco'  input number to exist visible input  ${bid_form_value_amount_input_locator}  ${fieldvalue}
#    submit form and check result                                ${bid_form_submit_btn_locator}  ${bid_form_submit_edit_success_msg}  ${tender_created_checker_element_locator}


add document to bid
    [Arguments]                                                 ${path}  ${doc_type}  ${doc_name}
    #=documents
    [Documentation]                                             Завантажити документ типу doc_type, який знаходиться за шляхом path,
    ...                                                         до цінової пропозиції користувача username для тендера tender_uaid.

    open popup by btn locator                                   ${bid_form_open_btn_locator}  ${bid_popup_locator}
###    execute javascript                                          $('.fancybox-is-open .fancybox-content .field-bidform-documents .js-upload-documents input[type$="file"]:first').click()
    choose file                                                 ${add_file_to_bid_form_locator}  ${path}
    run keyword and ignore error                                wait until page does not contain element  ${popup_dynamic_form_loading_element_locator}
    wait until element is visible                               ${bid_form_add_document_type_input_locator}
#    submit current visible popup
    log many  ${doc_type}
#    run keyword if                                              '${doc_type}' == 'documents'  Select From List By Value  ${bid_form_add_document_type_input_locator}  qualificationDocuments
#    ...                                                         else  Select From List By Value  ${bid_form_add_document_type_input_locator}  ${doc_type}
    Run Keyword And Ignore Error  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'documents' and "${mode}" not in "openeu open_competitive_dialogue"  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'documents' and "${mode}" in "openeu open_competitive_dialogue"  select from visible list by value  ${bid_form_add_document_type_input_locator}  qualificationDocuments
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'financial_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'qualification_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  qualificationDocuments
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'eligibility_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  eligibilityDocuments
    capture page screenshot

    Run Keyword And Ignore Error  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('commercialProposal').change()
    capture page screenshot
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'documents' and "${mode}" not in "openeu open_competitive_dialogue"  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('commercialProposal').change()
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'documents' and "${mode}" in "openeu open_competitive_dialogue"  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('qualificationDocuments').change()
    capture page screenshot
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'financial_documents'  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('commercialProposal').change()
    capture page screenshot
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'qualification_documents'  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('qualificationDocuments').change()
    capture page screenshot
    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'eligibility_documents'  Execute Javascript  $('.fancybox-is-open .fancybox-content .field-bidform-documents select[id*="-document_type"]:last').val('eligibilityDocuments').change()
#    Run Keyword And Ignore Error  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
#    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
#    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'financial_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  commercialProposal
#    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'qualification_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  qualificationDocuments
#    Run Keyword And Ignore Error  Run Keyword If  '${doc_type}' == 'eligibility_documents'  select from visible list by value  ${bid_form_add_document_type_input_locator}  eligibilityDocuments
    capture page screenshot

    click visible element                                       ${bid_form_add_document_description_btn_locator}
    wait until element is visible                               ${bid_form_add_document_description_input_locator}
    input text to exist visible input                           ${bid_form_add_document_description_input_locator}  test2
    click visible element                                       ${bid_form_add_document_close_description_btn_locator}

document to bid edit
    [Arguments]                                                 ${path}  ${doc_type}=documents
    [Documentation]                                             Змінити документ з doc_id в описі в пропозиції користувача username для
    ...                                                         тендера tender_uaid на документ, який знаходиться по шляху path.

    open popup by btn locator                                   ${bid_form_open_btn_locator}  ${bid_popup_locator}
#    click visible element                                       ${bid_form_edit_document_all_btn_locator}
    capture page screenshot
    choose file                                                 ${bid_form_edit_document_all_btn_locator}  ${path}
    capture page screenshot
#    wait until element is visible                               ${bid_form_add_document_type_input_locator}

fill bid form edit document
    [Arguments]                                                 ${doc_data}  ${doc_id}
    [Documentation]                                             Змінити тип документа з doc_id в заголовку в пропозиції користувача
    ...                                                         username для тендера tender_uaid. Дані про новий тип документа знаходяться в doc_data.

    open popup by btn locator                                   ${bid_form_open_btn_locator}  ${bid_popup_locator}
    ##### BOF - TMP for confidentiality#####
    execute javascript                                          $('#tender-bid-form .documents-dynamic-forms-wrapper:contains("Документи до пропозиції в цілому") [href$="#edit"]:first').click()
#    execute javascript                                          $('#tender-bid-form .documents-dynamic-forms-wrapper:last [href$="#edit"]:last').click()
#    click visible element                                       $('#tender-bid-form .documents-dynamic-forms-wrapper:last [href$="#edit"]:last').click()
    sleep  3
    capture page screenshot
    set element scroll into view                                ${bid_form_add_document_close_description_btn_locator}
    capture page screenshot
    wait until element is visible                               ${bid_form_add_document_description_input_locator}  60
    execute javascript                                          $('#tender-bid-form .documents-dynamic-forms-wrapper:contains("Документи до пропозиції в цілому") .popover.fade.top.in [id$="-confidentiality"]').click()
#    execute javascript                                          $('#tender-bid-form .documents-dynamic-forms-wrapper:last .popover.fade.top.in [id$="-confidentiality"]').click()

#    click visible element                                       ${bid_form_add_document_confidentiality_input_locator}
    capture page screenshot
    input text to exist visible input                           ${bid_form_add_document_confidentialityrationale_input_locator}  ${doc_data.data.confidentialityRationale}
    capture page screenshot
    click visible element                                       ${bid_form_add_document_close_description_btn_locator}
    capture page screenshot
    ##### EOF - TMP #####

get bid information
    [Arguments]                                                 ${field}
    [Documentation]                                             Отримати значення поля field пропозиції користувача
    ...                                                         username для тендера tender_uaid.

    capture page screenshot
    Run Keyword If  'status' == '${field}'                      submit form and check result   ${bid_form_refresh_btn_locator}  ${bid_form_refresh_success_msg}  ${tender_created_checker_element_locator}  ${true}
    Run Keyword If  'status' != '${field}'                      open popup by btn locator   ${bid_form_open_btn_locator}  ${bid_popup_locator}
#    click visible element                                       ${bid_form_open_btn_locator}
    capture page screenshot
    Run Keyword If  'status' != '${field}'                      wait until popup is visible
#    ${question_open_form_answer_locator} =                      replace string  ${question_open_form_answer_btn_locator_tpl}  %title%  ${question_id}
#    wait until page contains element with reloading             ${question_open_form_answer_locator}
    capture page screenshot
    Run Keyword If  'status' == '${field}'                      submit form and check result     ${bid_form_refresh_btn_locator}  ${bid_form_refresh_success_msg}  ${tender_created_checker_element_locator}  ${true}
    #${return_value} =                                           Run Keyword If  'lotValues[0].value.amount' == '${field}'         get value by locator on opened page  ${bid_lotValues_0_value_amount_value_locator}
    ${return_value} =                                           Run Keyword If  'lotValues[0].value.amount' == '${field}'         get bid value  ${bid_lotValues_0_value_amount_value_locator}
    ...  ELSE                                                   Run Keyword If  'status' == '${field}'        get value by locator on opened page  ${bid_form_bid_status_btn_locator}
    ...  ELSE                                                   Run Keyword If  'value.amount' == '${field}'   get bid value  ${bid_form_value_amount_input_locator}
##    ${return_value} =                                           Run Keyword If  'lotValues[0].value.amount' == '${field}'         get value by locator on opened page  ${bid_lotValues_0_value_amount_value_locator}
#    ...  ELSE                                                   Run Keyword If  'status' == '${field}'        get_text  ${bid_form_bid_status_btn_locator}
##    ...  ELSE                                                   Run Keyword If  'status' == '${field}'        get value by locator on opened page  ${bid_form_bid_status_btn_locator}
##    ...  ELSE                                                   Run Keyword If  'value.amount' == '${field}'   get value by locator on opened page  ${bid_form_value_amount_input_locator}
#    submit current visible popup
##    ${return_value} =                                           Run Keyword If  'lotValues[0].value.amount' == '${field}' or 'value.amount' == '${field}'   playtender_service.split_joinvalue  ${return_value}
##    ${return_value} =                                           Run Keyword If  'lotValues[0].value.amount' == '${field}' or 'value.amount' == '${field}'   Convert To Number  ${return_value}
    [Return]                                                    ${return_value}

fill bid form remove
    [Documentation]                                             Змінити статус цінової пропозиції для тендера tender_uaid
    ...                                                         користувача username на cancelled.

    click visible element                                       ${bid_form_remove_btn_locator}
    submit form and check result                                ${alert_opened_close_bid_btn_locator}  ${bid_form_submit_remove_success_msg}  ${tender_created_checker_element_locator}  ${true}

get bid value
    [Arguments]                                                 ${field}
    [Documentation]                                             Отримати значення поля field пропозиції користувача
    ...                                                         username для тендера tender_uaid.

    ${return_value} =                                           get value by locator on opened page  ${field}
    ${return_value} =                                           playtender_service.split_joinvalue  ${return_value}
    ${return_value} =                                           Convert To Number  ${return_value}
    [Return]                                                    ${return_value}

fill bid form criterias
    [Arguments]                                                 ${bid_parameters}
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції.

    log many  ${bid_parameters}
    click visible element                                       ${bid_form_criteria_1_btn_locator}
    capture page screenshot
    Jump by criteria

    click visible element                                       ${bid_form_criteria_2_btn_locator}
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 2")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 3")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 4")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 5")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 6")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 7")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot
    Execute Javascript                                          $('[href*="#criteria"] span:contains("Критерій 8")').click()
    capture page screenshot
    Jump by criteria
    capture page screenshot

Jump by criteria
    [Documentation]                                             Перехід по кваліфікаційним крітеріям цінової пропозиції.

    ${isCHILD_L_H_T_Сriterias}=                                 Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_chlht_locator}
    Run Keyword If  ${isCHILD_L_H_T_Сriterias}                  Вчинення правопорушень, пов'язаних з використанням дитячої праці
    ${isCORRUPTION_Сriterias}=                                  Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_corruption_locator}
    Run Keyword If  ${isCORRUPTION_Сriterias}                   Вчинення корупційних правопорушень
    ${isBB_Сriterias}=                                          Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_bb_locator}
    Run Keyword If  ${isBB_Сriterias}                           Порушення справ про банкрутство
    ${isfraud_Сriterias}=                                       Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_fraud_locator}
    Run Keyword If  ${isfraud_Сriterias}                        Вчинення економічних правопорушень
    ${ismova_Сriterias}=                                        Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_mova_locator}
    Run Keyword If  ${ismova_Сriterias}                         Мова (мови), якою (якими) повинні готуватися тендерні пропозиції
    ${ispico_Сriterias}=                                        Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_pico_locator}
    Run Keyword If  ${ispico_Сriterias}                         Вчинення злочинів, учинених з корисливих мотивів
    ${ispot_Сriterias}=                                         Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_pot_locator}
    Run Keyword If  ${ispot_Сriterias}                          Заборгованість зі сплати податків і зборів (обов'язкових платежів)
    ${isno_Сriterias}=                                          Run Keyword And Return Status  Element Should Be Visible  ${bid_form_get_criteria_value_title_no_locator}
    Run Keyword If  ${isno_Сriterias}                           Наявність інших підстав для відмови в участі у процедурі закупівлі

Вчинення правопорушень, пов'язаних з використанням дитячої праці
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Вчинення правопорушень, пов'язаних з використанням дитячої праці.

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_chlht_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Вчинення корупційних правопорушень
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Вчинення корупційних правопорушень

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_corruption_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot
    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:contains("Відомості про юридичну особу, яка є учасником процедури закупівлі, не внесено до Єдиного державного реєстру осіб, які вчинили корупційні або ")' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_corruption2_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria2_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Порушення справ про банкрутство
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Порушення справ про банкрутство

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_bb_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Вчинення економічних правопорушень
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Порушення справ про банкрутство

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_fraud_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Вчинення злочинів, учинених з корисливих мотивів
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Вчинення злочинів, учинених з корисливих мотивів

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_pico_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Заборгованість зі сплати податків і зборів (обов'язкових платежів)
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Заборгованість зі сплати податків і зборів (обов'язкових платежів)

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:contains("Він не має заборгованості зі сплати податків і зборів")' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_pot_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria3_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Наявність інших підстав для відмови в участі у процедурі закупівлі
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Наявність інших підстав для відмови в участі у процедурі закупівлі

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_no_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot
    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:contains("Юридична особа, яка є учасником процедури закупівлі")' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_no1_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria4_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot
    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:contains("У Єдиному державному реєстрі юридичних осіб, фізичних осіб")' ).click()
    capture page screenshot
    input text to exist visible input                           ${bid_form_get_criteria_value_title_no2_input_locator}  test2
    ${file_path}  ${file_name}  ${file_content} =               create_fake_doc
    capture page screenshot
    choose file                                                 ${bid_form_add_document_criteria5_btn_locator}  ${file_path}
    sleep  3
    capture page screenshot

Мова (мови), якою (якими) повинні готуватися тендерні пропозиції
    [Documentation]                                             Заповнити кваліфікаційні крітерії цінової пропозиції Мова (мови), якою (якими) повинні готуватися тендерні пропозиції

    Execute Javascript                                          $('#tender-bid-form .form-group.bid-requirement-responses-wrapper .js-lot-tab.active label:first' ).click()
    capture page screenshot

new
    ${features_length} =                                        Get Length  ${bid_parameters}
    : FOR  ${INDEX}  IN RANGE  0  ${features_length}
    \  ${bid_form_feature_input_locator}                        replace string  ${bid_form_feature_input_locator_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${bid_form_get_feature_input_locator}                    replace string  ${bid_form_get_feature_input_locator_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${bid_form_feature_input_locator_select}                 replace string  ${bid_form_feature_input_locator_select_tpl}  %title%  ${bid_parameters[${INDEX}]['code']}
    \  ${value_enum} =                                          convert float to string  ${bid_parameters[${INDEX}]['value']}
    \  ${bid_form_feature_value_input_locator}                  set variable  ${bid_form_feature_input_locator} ${bid_form_feature_value_input_locator_tpl}
    \  ${bid_form_get_feature_value_input_locator}              set variable  ${bid_form_get_feature_input_locator} ${bid_form_get_feature_value_input_locator_tpl}
    \  ${bid_form_feature_value_input_locator}                  replace string  ${bid_form_feature_value_input_locator}  _  ' '
    \  ${bid_form_get_feature_value_input_locator}              replace string  ${bid_form_get_feature_value_input_locator}  _  ' '
    \  ${bid_form_feature_value_input_locator}                  replace string  ${bid_form_feature_value_input_locator}  %value%  ${value_enum}
    \  ${bid_form_get_feature_value_input_locator}              replace string  ${bid_form_get_feature_value_input_locator}  %value%  ${value_enum}
    \  ${enum_val}                                              set variable  ${bid_form_get_feature_value_input_locator}
    \  ${enum_val1}=                                            run keyword if  ${bid_parameters[${INDEX}]['value']} == 0  Execute Javascript   return $('[data-weight-source="0"]').text()
    \  ...  ELSE                                                Execute Javascript    ${enum_val}
    \  capture page screenshot
    \  Run Keyword And Ignore Error                             select from list by label  ${bid_form_feature_input_locator_select}  ${enum_val1}
    \  capture page screenshot