playtender_claim.robot
3.16 KB
*** Settings ***
Resource playtender_common.robot
Resource playtender_claim_variables.robot
*** Keywords ***
Створити вимогу
[Arguments] ${username} ${tender_uaid} ${type} ${type_id} ${claim} ${doc_name}
[Documentation] Створити вимогу з claim в описі для тендера tender_uaid.
click visible element ${claim_form_open_btn_locator}
wait until popup is visible
input text to exist visible input ${claim_form_complaintform_title_input_locator} ${claim.data.title}
input text to exist visible input ${claim_form_complaintform_description_input_locator} ${claim.data.description}
Run Keyword And Ignore Error Run Keyword If '${type}' == 'tender' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Закупівля
Run Keyword And Ignore Error Run Keyword If '${type}' == 'lot' Select From List By Label ${claim_form_complaintform_related_of_input_locator} Лот
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}
Run Keyword And Ignore Error Select From List By Label ${claim_form_complaintform_complaintform_type_input_locator} Вимога
Run Keyword If '${doc_name}' != 'null' click visible element ${claim_form_complaintform_document_btn_locator}
Run Keyword If '${doc_name}' != 'null' choose file ${add_file_to_form_locator} ${doc_name}
Run Keyword If '${doc_name}' != 'null' wait until page does not contain element ${popup_dynamic_form_loading_element_locator}
# Run Keyword If '${doc_name}' != 'null' submit current visible popup
submit form and check result ${claim_form_complaintform_submit_btn_locator} ${tender_form_submit_success_msg} ${tender_created_checker_element_locator}
# Функция ожидания claim_uaid_text_locator соответствующей вимоги
click visible element ${claim_form_open_btn_locator}
${return_value}= Get Element Attribute ${claim_uaid_text_locator}
${return_value}= Convert To String ${return_value}
[return] ${return_value}