...
|
...
|
@@ -7,6 +7,10 @@ Library DateTime |
7
|
7
|
${locator.tenderId} jquery=h3
|
8
|
8
|
##Використовую такий шлях у кожного буде мінятись /yboi/. Міняйте на сві шлях до файлу
|
9
|
9
|
${file_add} /home/yboi/openprocurement.robottests.buildout/Document.docx
|
|
10
|
+${locator.title} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[6]
|
|
11
|
+${locator.description} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[7]
|
|
12
|
+${locator.minimalStep.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[9]
|
|
13
|
+${locator.value.amount} xpath=(//div[@class = 'col-sm-8']/p[@class='ng-binding'])[8]
|
10
|
14
|
|
11
|
15
|
*** Keywords ***
|
12
|
16
|
Підготувати клієнт для користувача
|
...
|
...
|
@@ -39,8 +43,6 @@ Login |
39
|
43
|
${items_description}= Get From Dictionary ${prepared_tender_data.data} description
|
40
|
44
|
${quantity}= Get From Dictionary ${items[0]} quantity
|
41
|
45
|
${cpv}= Get From Dictionary ${items[0].classification} id
|
42
|
|
- ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
|
43
|
|
- ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
|
44
|
46
|
${unit}= Get From Dictionary ${items[0].unit} name
|
45
|
47
|
${start_date}= Get From Dictionary ${prepared_tender_data.data.tenderPeriod} startDate
|
46
|
48
|
${start_date}= convert_date_to_etender_format ${start_date}
|
...
|
...
|
@@ -79,7 +81,6 @@ Login |
79
|
81
|
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}
|
80
|
82
|
Sleep 2
|
81
|
83
|
Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification']
|
82
|
|
- Wait Until Element Is Visible xpath=//div[contains(@role,'dialog')]
|
83
|
84
|
Sleep 1
|
84
|
85
|
Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv}
|
85
|
86
|
Sleep 2
|
...
|
...
|
@@ -88,24 +89,18 @@ Login |
88
|
89
|
Sleep 1
|
89
|
90
|
Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()']
|
90
|
91
|
Sleep 1
|
91
|
|
- Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification']
|
92
|
|
- Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')]
|
93
|
|
- Sleep 1
|
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}
|
96
|
|
- Sleep 1
|
97
|
|
- Click Element xpath=//td[contains(., '${dkpp_id}')]
|
98
|
|
- Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
|
99
|
|
- Run Keyword if '${mode}' == 'multi' Додати предмет items
|
|
92
|
+ Додати предмет ${items[0]} 0
|
|
93
|
+ Run Keyword if '${mode}' == 'multi' Додати багато предметів items
|
100
|
94
|
Sleep 1
|
101
|
95
|
Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
|
102
|
96
|
Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
|
103
|
97
|
Sleep 1
|
104
|
98
|
Wait Until Page Contains [ТЕСТУВАННЯ] 100
|
105
|
|
- Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
|
|
99
|
+ Sleep 20
|
|
100
|
+ Click Element xpath=//*[text()='${title}']
|
106
|
101
|
Sleep 5
|
107
|
102
|
${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")]
|
108
|
|
- ${tender_UAid}= Get Substring ${tender_UAid} 7
|
|
103
|
+ ${tender_UAid}= Get Substring ${tender_UAid} 10
|
109
|
104
|
${Ids}= Convert To String ${tender_UAid}
|
110
|
105
|
Run keyword if '${mode}' == 'multi' Set Multi Ids ${ARGUMENTS[0]} ${tender_UAid}
|
111
|
106
|
[return] ${Ids}
|
...
|
...
|
@@ -113,9 +108,10 @@ Login |
113
|
108
|
Set Multi Ids
|
114
|
109
|
[Arguments] @{ARGUMENTS}
|
115
|
110
|
[Documentation]
|
116
|
|
- ... ${ARGUMENTS[0]} == username
|
117
|
|
- ${id}= Get Text xpath=//div[contains(@class, "panel-heading")]
|
118
|
|
- ${Ids}= Create List ${tender_UAid} ${id}
|
|
111
|
+ ... ${ARGUMENTS[0]} == ${tender_UAid}
|
|
112
|
+ ${current_location}= Get Location
|
|
113
|
+ ${id}= Get Substring ${current_location} 10
|
|
114
|
+ ${Ids}= Create List ${tender_UAid} ${id}
|
119
|
115
|
|
120
|
116
|
Oтримати internal id по UAid
|
121
|
117
|
[Arguments] @{ARGUMENTS}
|
...
|
...
|
@@ -131,44 +127,28 @@ Oтримати internal id по UAid |
131
|
127
|
[Arguments] @{ARGUMENTS}
|
132
|
128
|
[Documentation]
|
133
|
129
|
... ${ARGUMENTS[0]} == items
|
134
|
|
- ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description
|
135
|
|
- ${dkpp_id1}= Get From Dictionary ${items[1].additionalClassifications[0]} id
|
136
|
|
- ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description
|
137
|
|
- ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id
|
138
|
|
- ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description
|
139
|
|
- ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id
|
140
|
|
-
|
141
|
|
- Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
|
142
|
|
- Sleep 2
|
143
|
|
- Click Element xpath=.//*[@id='myform']/tender-form/div/button
|
|
130
|
+ ... ${ARGUMENTS[1]} == ${INDEX}
|
|
131
|
+ ${dkpp_desc}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description
|
|
132
|
+ ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id
|
144
|
133
|
Sleep 2
|
145
|
|
- Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2]
|
|
134
|
+ Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[${ARGUMENTS[1]}+1]
|
146
|
135
|
Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')]
|
147
|
|
- Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1}
|
148
|
|
- Wait Until Page Contains ${dkpp_id1}
|
149
|
|
- Sleep 1
|
150
|
|
- Click Element xpath=//td[contains(., '${dkpp_id1}')]
|
151
|
|
- Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
|
152
|
136
|
Sleep 2
|
153
|
|
- Click Element xpath=.//*[@id='myform']/tender-form/div/button
|
154
|
|
- Sleep 2
|
155
|
|
- Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3]
|
156
|
|
- Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')]
|
157
|
|
- Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2}
|
158
|
|
- Wait Until Page Contains ${dkpp_id2}
|
|
137
|
+ Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc}
|
|
138
|
+ Wait Until Page Contains ${dkpp_id}
|
159
|
139
|
Sleep 1
|
160
|
|
- Click Element xpath=//td[contains(., '${dkpp_id2}')]
|
|
140
|
+ Click Element xpath=//td[contains(., '${dkpp_id}')]
|
161
|
141
|
Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
|
162
|
142
|
Sleep 2
|
163
|
|
- Click Element xpath=.//*[@id='myform']/tender-form/div/button
|
164
|
|
- Sleep 2
|
165
|
|
- Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4]
|
166
|
|
- Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')]
|
167
|
|
- Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3}
|
168
|
|
- Wait Until Page Contains ${dkpp_id3}
|
169
|
|
- Sleep 1
|
170
|
|
- Click Element xpath=//td[contains(., '${dkpp_id3}')]
|
171
|
|
- Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
|
|
143
|
+
|
|
144
|
+Додати багато предметів
|
|
145
|
+ [Arguments] @{ARGUMENTS}
|
|
146
|
+ [Documentation]
|
|
147
|
+ ... ${ARGUMENTS[0]} == items
|
|
148
|
+ ${Items_length}= Get Length ${items}
|
|
149
|
+ : FOR ${INDEX} IN RANGE 1 ${Items_length}
|
|
150
|
+ \ Click Element xpath=.//*[@id='myform']/tender-form/div/button
|
|
151
|
+ \ Додати предмет ${items[${INDEX}]} ${INDEX}
|
172
|
152
|
|
173
|
153
|
Пошук тендера по ідентифікатору
|
174
|
154
|
[Arguments] @{ARGUMENTS}
|
...
|
...
|
@@ -250,6 +230,61 @@ Oтримати internal id по UAid |
250
|
230
|
Wait Until Page Contains ${ARGUMENTS[1]} 10
|
251
|
231
|
sleep 1
|
252
|
232
|
|
|
233
|
+Внести зміни в тендер
|
|
234
|
+ [Arguments] @{ARGUMENTS}
|
|
235
|
+ [Documentation]
|
|
236
|
+ ... ${ARGUMENTS[0]} = username
|
|
237
|
+ ... ${ARGUMENTS[1]} = ${TENDER_UAID}
|
|
238
|
+ ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} single
|
|
239
|
+ ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA}
|
|
240
|
+ ${items}= Get From Dictionary ${tender_data.data} items
|
|
241
|
+ ${description}= Get From Dictionary ${tender_data.data} description
|
|
242
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
243
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
|
|
244
|
+ Wait Until Page Contains Element xpath=//a[@class='btn btn-primary ng-scope'] 10
|
|
245
|
+ Click Element xpath=//a[@class='btn btn-primary ng-scope']
|
|
246
|
+ Sleep 2
|
|
247
|
+ Input text id=description ${description}
|
|
248
|
+ Click Element xpath=//button[@class='btn btn-info ng-isolate-scope']
|
|
249
|
+ Capture Page Screenshot
|
|
250
|
+
|
|
251
|
+додати предмети закупівлі
|
|
252
|
+ [Arguments] @{ARGUMENTS}
|
|
253
|
+ [Documentation]
|
|
254
|
+ ... ${ARGUMENTS[0]} = username
|
|
255
|
+ ... ${ARGUMENTS[1]} = ${TENDER_UAID}
|
|
256
|
+ ... ${ARGUMENTS[2]} = 3
|
|
257
|
+ ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi
|
|
258
|
+ ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA}
|
|
259
|
+ ${items}= Get From Dictionary ${tender_data.data} items
|
|
260
|
+ Selenium2Library.Switch Browser ${ARGUMENTS[0]}
|
|
261
|
+ Run keyword if '${TEST NAME}' == 'Можливість додати позицію закупівлі в тендер' додати позицію
|
|
262
|
+ Run keyword if '${TEST NAME}' != 'Можливість додати позицію закупівлі в тендер' видалити позиції
|
|
263
|
+
|
|
264
|
+додати позицію
|
|
265
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
|
|
266
|
+ Sleep 2
|
|
267
|
+ Click Element xpath=//a[@class='btn btn-primary ng-scope']
|
|
268
|
+ Sleep 2
|
|
269
|
+ : FOR ${INDEX} IN RANGE 1 ${ARGUMENTS[2]} +1
|
|
270
|
+ \ Click Element xpath=.//*[@id='myform']/tender-form/div/button
|
|
271
|
+ \ Додати предмет ${items[${INDEX}]} ${INDEX}
|
|
272
|
+ Sleep 2
|
|
273
|
+ Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни']
|
|
274
|
+ Wait Until Page Contains [ТЕСТУВАННЯ] 100
|
|
275
|
+
|
|
276
|
+видалити позиції
|
|
277
|
+ etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
|
|
278
|
+ Click Element xpath=//a[@class='btn btn-primary ng-scope']
|
|
279
|
+ Sleep 2
|
|
280
|
+ : FOR ${INDEX} IN RANGE 1 ${ARGUMENTS[2]} +1
|
|
281
|
+ \ Click Element xpath=(//button[@class='btn btn-danger ng-scope'])[last()]
|
|
282
|
+ \ Sleep 1
|
|
283
|
+ Sleep 2
|
|
284
|
+ Wait Until Page Contains Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни'] 10
|
|
285
|
+ Click Element xpath=//div[@class='form-actions']/button[./text()='Зберегти зміни']
|
|
286
|
+ Wait Until Page Contains [ТЕСТУВАННЯ] 100
|
|
287
|
+
|
253
|
288
|
отримати інформацію із тендера
|
254
|
289
|
[Arguments] @{ARGUMENTS}
|
255
|
290
|
[Documentation]
|
...
|
...
|
@@ -257,15 +292,9 @@ Oтримати internal id по UAid |
257
|
292
|
... ${ARGUMENTS[1]} == fieldname
|
258
|
293
|
Switch browser ${ARGUMENTS[0]}
|
259
|
294
|
${return_value}= run keyword отримати інформацію про ${ARGUMENTS[1]}
|
|
295
|
+ Log ${return_value}
|
260
|
296
|
[return] ${return_value}
|
261
|
297
|
|
262
|
|
-Відмітити на сторінці поле з тендера
|
263
|
|
- [Arguments] ${fieldname} ${locator}
|
264
|
|
- ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom
|
265
|
|
- Align elements horizontally ${locator} ${last_note_id}
|
266
|
|
- sleep 1
|
267
|
|
- Remove element ${last_note_id}
|
268
|
|
-
|
269
|
298
|
Отримати тест із поля і показати на сторінці
|
270
|
299
|
[Arguments] ${fieldname}
|
271
|
300
|
sleep 3
|
...
|
...
|
@@ -273,33 +302,41 @@ Oтримати internal id по UAid |
273
|
302
|
${return_value}= Get Text ${locator.${fieldname}}
|
274
|
303
|
[return] ${return_value}
|
275
|
304
|
|
276
|
|
-отримати інформацію про tenderId
|
277
|
|
- ${return_value}= Отримати тест із поля і показати на сторінці tenderId
|
278
|
|
- [return] ${return_value.split(' ')[1]}
|
279
|
|
-
|
280
|
305
|
отримати інформацію про title
|
281
|
306
|
${return_value}= Отримати тест із поля і показати на сторінці title
|
282
|
307
|
[return] ${return_value}
|
283
|
308
|
|
284
|
309
|
отримати інформацію про description
|
285
|
|
- ${description}= Get text xpath=(//div[@class = 'col-sm-8'])[8]
|
286
|
|
- [return] ${description}
|
|
310
|
+ ${return_value}= Отримати тест із поля і показати на сторінці description
|
|
311
|
+ [return] ${return_value}
|
287
|
312
|
|
288
|
313
|
отримати інформацію про minimalStep.amount
|
289
|
|
- ${step_rate}= Get text xpath=(//div[@class = 'col-sm-8'])[10]
|
290
|
|
- ${step_rate}= Convert To Number ${step_rate.split(' ')[0]}
|
291
|
|
- [return] ${step_rate}
|
|
314
|
+ ${return_value}= Отримати тест із поля і показати на сторінці minimalStep.amount
|
|
315
|
+ ${return_value}= Convert To Number ${return_value.split(' ')[0]}
|
|
316
|
+ [return] ${return_value}
|
|
317
|
+
|
|
318
|
+отримати інформацію про value.amount
|
|
319
|
+ ${return_value}= Отримати тест із поля і показати на сторінці value.amount
|
|
320
|
+ ${return_value}= Evaluate "".join("${return_value}".split(' ')[:-3])
|
|
321
|
+ ${return_value}= Convert To Number ${return_value}
|
|
322
|
+ [return] ${return_value}
|
|
323
|
+
|
|
324
|
+Відмітити на сторінці поле з тендера
|
|
325
|
+ [Arguments] ${fieldname} ${locator}
|
|
326
|
+ ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom
|
|
327
|
+ Align elements horizontally ${locator} ${last_note_id}
|
|
328
|
+ sleep 1
|
|
329
|
+ Remove element ${last_note_id}
|
|
330
|
+
|
|
331
|
+отримати інформацію про tenderId
|
|
332
|
+ ${return_value}= отримати тест із поля і показати на сторінці tenderId
|
|
333
|
+ ${return_value}= Get Substring ${return_value} 10
|
|
334
|
+ [return] ${return_value}
|
292
|
335
|
|
293
|
336
|
отримати інформацію про procuringEntity.name
|
294
|
337
|
${return_value}= Отримати тест із поля і показати на сторінці procuringEntity.name
|
295
|
338
|
[return] ${return_value}
|
296
|
339
|
|
297
|
|
-отримати інформацію про value.amount
|
298
|
|
- ${budget}= Get text xpath=(//div[@class = 'col-sm-8'])[9]
|
299
|
|
- ${budget}= Evaluate "".join("${budget}".split(' ')[:-3])
|
300
|
|
- ${budget}= Convert To Number ${budget}
|
301
|
|
- [return] ${budget}
|
302
|
|
-
|
303
|
340
|
отримати інформацію про tenderPeriod.startDate
|
304
|
341
|
${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate
|
305
|
342
|
[return] ${return_value}
|
...
|
...
|
@@ -316,7 +353,6 @@ Oтримати internal id по UAid |
316
|
353
|
${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate
|
317
|
354
|
[return] ${return_value}
|
318
|
355
|
|
319
|
|
-
|
320
|
356
|
отримати інформацію про items[${item_id}].description
|
321
|
357
|
відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)>
|
322
|
358
|
${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)>
|
...
|
...
|
|