...
|
...
|
@@ -3,6 +3,7 @@ Library Selenium2Screenshots |
3
|
3
|
Library String
|
4
|
4
|
Library DateTime
|
5
|
5
|
|
|
6
|
+
|
6
|
7
|
*** Variables ***
|
7
|
8
|
${locator.tenderId} jquery=h3
|
8
|
9
|
${locator.title} jquery=tender-subject-info>div.row:contains("Назва закупівлі:")>:eq(1)>
|
...
|
...
|
@@ -16,22 +17,102 @@ ${locator.enquiryPeriod.startDate} jquery=tender-procedure-info>div.row:contai |
16
|
17
|
${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contains("Завершення періоду уточнень:")>:eq(1)>
|
17
|
18
|
|
18
|
19
|
*** Keywords ***
|
19
|
|
-Підготувати дані для задання питання
|
20
|
|
- ${QUESTIONS}= prepare_test_question_data
|
21
|
|
- [return] ${QUESTIONS}
|
22
|
|
-
|
23
|
20
|
Підготувати клієнт для користувача
|
24
|
21
|
[Arguments] @{ARGUMENTS}
|
25
|
22
|
[Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
|
26
|
23
|
... ${ARGUMENTS[0]} == username
|
27
|
24
|
Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} alias=${ARGUMENTS[0]}
|
28
|
|
- Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position}
|
29
|
|
- Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
|
|
25
|
+ Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
|
|
26
|
+# login
|
30
|
27
|
Wait Until Page Contains Element id=inputUsername 100
|
31
|
|
- Input text id=inputUsername ${USERS.users['${ARGUMENTS[0]}'].login}
|
32
|
|
- Input text id=inputPassword ${USERS.users['${ARGUMENTS[0]}'].password}
|
|
28
|
+ Input text id=inputUsername ${USERS.users['${username}'].login}
|
|
29
|
+ Input text id=inputPassword ${USERS.users['${username}'].password}
|
33
|
30
|
Click Button id=btn_submit
|
34
|
|
- Wait Until Page Contains Ви успішно увійшли в систему! 100
|
|
31
|
+
|
|
32
|
+Створити тендер
|
|
33
|
+ [Arguments] @{ARGUMENTS}
|
|
34
|
+ [Documentation]
|
|
35
|
+ ... ${ARGUMENTS[0]} == username
|
|
36
|
+ ... ${ARGUMENTS[1]} == tender_data
|
|
37
|
+
|
|
38
|
+ ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
|
|
39
|
+ ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
|
|
40
|
+ ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
|
|
41
|
+ ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount
|
|
42
|
+ ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount
|
|
43
|
+ ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description
|
|
44
|
+ ${quantity}= Get From Dictionary ${items[0]} quantity
|
|
45
|
+ ${cpv}= Get From Dictionary ${items[0].classification} id
|
|
46
|
+ ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
|
|
47
|
+ ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
|
|
48
|
+ ${unit}= Get From Dictionary ${items[0].unit} name
|
|
49
|
+ ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
|
|
50
|
+ ${start_date}= convert_date_to_etender_format ${start_date}
|
|
51
|
+ ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
|
|
52
|
+ ${start_time}= convert_time_to_etender_format ${start_time}
|
|
53
|
+ ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
|
|
54
|
+ ${end_date}= convert_date_to_etender_format ${end_date}
|
|
55
|
+ ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
|
|
56
|
+ ${end_time}= convert_time_to_etender_format ${end_time}
|
|
57
|
+ ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
|
|
58
|
+ ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date}
|
|
59
|
+ ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
|
|
60
|
+ ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time}
|
|
61
|
+
|
|
62
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
63
|
+ Wait Until Page Contains Мої закупівлі 100
|
|
64
|
+ Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі']
|
|
65
|
+ Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')]
|
|
66
|
+ Click Element xpath=//a[contains(@class, 'btn btn-info')]
|
|
67
|
+ Wait Until Page Contains Element id=title
|
|
68
|
+ Input text id=title ${title}
|
|
69
|
+ Input text id=description ${description}
|
|
70
|
+ Input text id=value ${budget}
|
|
71
|
+ Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox']
|
|
72
|
+ Input text id=minimalStep ${step_rate}
|
|
73
|
+ Input text id=itemsDescription ${items_description}
|
|
74
|
+ Input text id=itemsQuantity ${quantity}
|
|
75
|
+ Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram']
|
|
76
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date}
|
|
77
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.enquiryPeriod.endDate'] ${enquiry_end_time}
|
|
78
|
+
|
|
79
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='startDate'] ${start_date}
|
|
80
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.startDate'] ${start_time}
|
|
81
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date}
|
|
82
|
+ Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.endDate'] ${end_time}
|
|
83
|
+
|
|
84
|
+ Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification']
|
|
85
|
+ Wait Until Page Contains Оберіть класифікатор CPV 100
|
|
86
|
+ Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv}
|
|
87
|
+ Wait Until Page Contains Картонки 100
|
|
88
|
+ Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[1]//td[1]
|
|
89
|
+ Wait Until Page Contains 44617100-9 Картонки 100
|
|
90
|
+ Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()']
|
|
91
|
+
|
|
92
|
+ Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification']
|
|
93
|
+ Wait Until Page Contains Класифікатор ДКПП 100
|
|
94
|
+ Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc}
|
|
95
|
+ Wait Until Page Contains ${dkpp_id} 100
|
|
96
|
+ Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[2]//td[1]
|
|
97
|
+ Wait Until Page Contains 17.21.1 "Папір і картон гофровані, паперова й картонна тара" 100
|
|
98
|
+ Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
|
|
99
|
+ Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
|
|
100
|
+ Wait Until Page Contains [ТЕСТУВАННЯ] 100
|
|
101
|
+ Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
|
|
102
|
+ ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid
|
|
103
|
+ ${current_location}= Get Location
|
|
104
|
+ ${tender_id}= Fetch From Right ${current_location} /
|
|
105
|
+### harcode Idis bacause issues on the E-tender side, to remove, 2 lines:
|
|
106
|
+ #${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2
|
|
107
|
+ ${tender_id}= Convert To String cf445fd7836844b68b2c06dcad2a5298
|
|
108
|
+ ${tender_UAid}= Convert To String UA-2015-06-30-000012
|
|
109
|
+ ${Ids} Create List ${tender_id} ${tender_UAid}
|
|
110
|
+ [return] ${Ids}
|
|
111
|
+
|
|
112
|
+get tender UAid
|
|
113
|
+ ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")]
|
|
114
|
+ ${tender_UAid}= Get Substring ${tender_UAid} 7 27
|
|
115
|
+ [return] ${tender_UAid}
|
35
|
116
|
|
36
|
117
|
Пошук тендера по ідентифікатору
|
37
|
118
|
[Arguments] @{ARGUMENTS}
|
...
|
...
|
@@ -40,21 +121,21 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai |
40
|
121
|
... ${ARGUMENTS[1]} == tenderId
|
41
|
122
|
... ${ARGUMENTS[2]} == id
|
42
|
123
|
Switch browser ${ARGUMENTS[0]}
|
43
|
|
- ${current_location}= Get Location
|
44
|
|
- Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
|
45
|
|
- Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
|
46
|
|
- Wait Until Page Contains E-TENDER - центр електронної торгівлі 10
|
47
|
|
- sleep 1
|
48
|
|
- Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
|
49
|
|
- Click Link jquery=a[ng-click='search()']
|
50
|
|
- sleep 2
|
|
124
|
+ ${current_location}= Get Location
|
|
125
|
+ Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
|
|
126
|
+ Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
|
|
127
|
+ Wait Until Page Contains Список закупівель 10
|
|
128
|
+ sleep 1
|
|
129
|
+ Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
|
|
130
|
+ Click Link jquery=a[ng-click='search()']
|
|
131
|
+ sleep 2
|
51
|
132
|
# ${last_note_id}= Add pointy note jquery=a[href^="#/tenderDetailes"] Found tender with tenderID "${ARGUMENTS[1]}" width=200 position=bottom
|
52
|
133
|
# sleep 1
|
53
|
134
|
# Remove element ${last_note_id}
|
54
|
|
- Click Link jquery=a[href^="#/tenderDetailes"]
|
55
|
|
- Wait Until Page Contains ${ARGUMENTS[1]} 10
|
56
|
|
- sleep 1
|
57
|
|
- Capture Page Screenshot
|
|
135
|
+ Click Link jquery=a[href^="#/tenderDetailes"]
|
|
136
|
+ Wait Until Page Contains ${ARGUMENTS[1]} 10
|
|
137
|
+ sleep 1
|
|
138
|
+ Capture Page Screenshot
|
58
|
139
|
|
59
|
140
|
обновити сторінку з тендером
|
60
|
141
|
[Arguments] @{ARGUMENTS}
|
...
|
...
|
@@ -191,29 +272,54 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai |
191
|
272
|
${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last>
|
192
|
273
|
[return] ${return_value}
|
193
|
274
|
|
|
275
|
+Подати цінову пропозицію
|
|
276
|
+ [Arguments] @{ARGUMENTS}
|
|
277
|
+ [Documentation]
|
|
278
|
+ ... ${ARGUMENTS[0]} == username
|
|
279
|
+ ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID}
|
|
280
|
+ ... ${ARGUMENTS[2]} == test_bid_data
|
|
281
|
+
|
|
282
|
+ ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount
|
|
283
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
284
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
|
|
285
|
+ Wait Until Page Contains Інформація про процедуру закупівлі 100
|
|
286
|
+ Wait Until Page Contains Element id=amount 10
|
|
287
|
+ Input text id=amount ${bid}
|
|
288
|
+ Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції']
|
|
289
|
+
|
194
|
290
|
Задати питання
|
195
|
291
|
[Arguments] @{ARGUMENTS}
|
196
|
292
|
[Documentation]
|
197
|
293
|
... ${ARGUMENTS[0]} = username
|
198
|
|
- ... ${ARGUMENTS[1]} = tenderid
|
|
294
|
+ ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
|
199
|
295
|
... ${ARGUMENTS[2]} = question_data
|
200
|
296
|
|
201
|
297
|
${title}= Get From Dictionary ${ARGUMENTS[2].data} title
|
202
|
298
|
${description}= Get From Dictionary ${ARGUMENTS[2].data} description
|
203
|
299
|
|
204
|
|
- Wait Until Page Contains Element jquery=a[href="#/"]
|
205
|
|
- Click Element jquery=a[href="#/"]
|
206
|
|
- Wait Until Page Contains Element jquery=input[ng-change='search()']
|
207
|
|
- Input Text jquery=input[ng-change='search()'] UA-2015-06-12-000038
|
208
|
|
-#Наразі закупівлі створюються в чернеку, не в ЦБД, використовую хард-код замість:
|
209
|
|
-#Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
|
210
|
|
- Wait Until Page Contains Element jquery=a[ng-click="search()"]
|
211
|
|
- Click Element jquery=a[ng-click="search()"]
|
212
|
|
- Wait Until Page Contains [ТЕСТУВАННЯ] 100
|
213
|
|
- Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
|
214
|
|
- Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"]
|
215
|
|
- Click Link jquery=a[href^="#/addQuestion/"]
|
|
300
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
301
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
|
|
302
|
+
|
|
303
|
+ Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100
|
|
304
|
+ Click Element jquery=a[href^="#/addQuestion/"]
|
216
|
305
|
Wait Until Page Contains Element id=title
|
217
|
306
|
Input text id=title ${title}
|
218
|
307
|
Input text id=description ${description}
|
219
|
|
- Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] |
|
|
\ No newline at end of file |
|
308
|
+ Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
|
|
309
|
+
|
|
310
|
+Відповісти на питання
|
|
311
|
+ [Arguments] @{ARGUMENTS}
|
|
312
|
+ [Documentation]
|
|
313
|
+ ... ${ARGUMENTS[0]} = username
|
|
314
|
+ ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
|
|
315
|
+ ... ${ARGUMENTS[2]} = 0
|
|
316
|
+ ... ${ARGUMENTS[3]} = answer_data
|
|
317
|
+
|
|
318
|
+ ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer
|
|
319
|
+
|
|
320
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
321
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
|
|
322
|
+
|
|
323
|
+ Click Element xpath=//div[div/pre[1]]/div[1]
|
|
324
|
+ Input text xpath=//div[textarea]/textarea ${answer}
|
|
325
|
+ Click Element xpath=//div[textarea]/span/button[1] |
...
|
...
|
|