playtender_plan.robot
5.52 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
*** Settings ***
Resource playtender_common.robot
*** Keywords ***
open new plan form
[Documentation] відкриття сторінки створення плану
open page and wait element by locator ${broker_baseurl}/plan/create ${plan_form_locator}
open plan page by uaid
[Arguments] ${uaid}
[Documentation] відкриває сторінку з планом
open page and wait element by locator ${broker_baseurl}/plan/${uaid} ${plan_view_checker_element_locator}
open plan search form
[Documentation] відкриває сторінку з пошуком планів
open page and wait element by locator ${broker_baseurl}/plans ${plan_search_form_locator}
fill plan form
[Arguments] ${data}
[Documentation] заповнення форми з масива даних
# hidden inputs
${budget_id} = get from dictionary by keys ${data} budget id
run keyword if condition is not none ${budget_id} input text to hidden input ${plan_form_budget_id_input_locator} ${budget_id}
${project_id} = get from dictionary by keys ${data} budget project id
run keyword if condition is not none ${project_id} input text to hidden input ${plan_form_project_id_input_locator} ${project_id}
${project_name} = get from dictionary by keys ${data} budget project name
run keyword if condition is not none ${project_name} input text to hidden input ${plan_form_project_name_input_locator} ${project_name}
# general info
open popup by btn locator ${plan_form_general_panel_edit_btn_locator}
${procurement_method_type} = get from dictionary by keys ${data} tender procurementMethodType
run keyword if condition is not none ${procurement_method_type} select from visible list by value ${plan_form_procurement_method_type_input_locator} ${procurement_method_type}
${budget_description} = get from dictionary by keys ${data} budget description
run keyword if condition is not none ${budget_description} input text to visible input ${plan_form_title_input_locator} ${budget_description}
${tender_start_date} = get from dictionary by keys ${data} tender tenderPeriod startDate
run keyword if condition is not none ${tender_start_date} select from visible list by year of date ${plan_form_year_input_locator} ${tender_start_date}
run keyword if condition is not none ${tender_start_date} input month.year of date to visible input ${plan_form_tender_start_date_input_locator} ${tender_start_date}
${amount} = get from dictionary by keys ${data} budget amount
run keyword if condition is not none ${amount} input number to visible input ${plan_form_value_amount_input_locator} ${amount}
${currency} = get from dictionary by keys ${data} budget currency
run keyword if condition is not none ${currency} select from visible list by value ${plan_form_value_currency_input_locator} ${currency}
${classification} = get from dictionary by keys ${data} classification
run keyword if condition is not none ${classification} select classification by code attributes ${plan_form_classification_edit_btn_locator} ${classification}
${additional_classifications} = get from dictionary by keys ${data} additionalClassifications
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_additional_classification_edit_btn_locator} ${additional_classifications} ${None} ${kekv_schemes}
run keyword if condition is not none ${additional_classifications} select classification by array of code attributes ${plan_form_kekv_classification_edit_btn_locator} ${additional_classifications} ${kekv_schemes}
submit current visible popup
# items
${items} = get from dictionary by keys ${data} items
run keyword if condition is not none ${items} fill plan form items ${items}
fill plan form items
[Arguments] ${item_attributes_array}
[Documentation] заповнення номенклатури плану
:FOR ${item_attributes} IN @{item_attributes_array}
\ click visible element ${plan_form_add_item_btn_locator}
\ wait until popup is visible
\ fill item form in opened popup ${item_attributes}
\ submit current visible popup