Showing
5 changed files
with
217 additions
and
93 deletions
... | ... | @@ -166,7 +166,7 @@ Set Multi Ids |
166 | 166 | ... ${ARGUMENTS[0]} == items |
167 | 167 | ... ${ARGUMENTS[1]} == ${INDEX} |
168 | 168 | ${dkpp_desc}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description |
169 | - ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id | |
169 | + ${dkpp_id}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id | |
170 | 170 | Sleep 2 |
171 | 171 | Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[${ARGUMENTS[1]}+1] |
172 | 172 | Wait Until Element Is Visible xpath=//div[contains(@id,'addClassification')] |
... | ... | @@ -539,4 +539,4 @@ Change_date_to_month |
539 | 539 | |
540 | 540 | отримати інформацію про questions[0].answer |
541 | 541 | ${return_value}= отримати тест із поля і показати на сторінці questions[0].answer |
542 | - [return] ${return_value} | |
\ No newline at end of file | ||
542 | + [return] ${return_value} | |
... | ... |
... | ... | @@ -3,20 +3,28 @@ Library Selenium2Screenshots |
3 | 3 | Library String |
4 | 4 | Library DateTime |
5 | 5 | |
6 | - | |
7 | 6 | *** Variables *** |
8 | -${file_path} local_path_to_file("TestDocument.docx") | |
9 | 7 | ${locator.tenderId} xpath=//td[./text()='TenderID']/following-sibling::td[1] |
10 | 8 | ${locator.title} xpath=//td[./text()='Загальна назва закупівлі']/following-sibling::td[1] |
11 | 9 | ${locator.description} xpath=//td[./text()='Предмет закупівлі']/following-sibling::td[1] |
12 | 10 | ${locator.value.amount} xpath=//td[./text()='Максимальний бюджет']/following-sibling::td[1] |
13 | -${locator.minimalStep.amount} xpath=//td[./text()='Крок зменшення ціни']/following-sibling::td[1] | |
11 | +${locator.minimalStep.amount} xpath=//td[./text()='Мінімальний крок зменшення ціни']/following-sibling::td[1] | |
14 | 12 | ${locator.enquiryPeriod.endDate} xpath=//td[./text()='Завершення періоду обговорення']/following-sibling::td[1] |
15 | 13 | ${locator.tenderPeriod.endDate} xpath=//td[./text()='Завершення періоду прийому пропозицій']/following-sibling::td[1] |
16 | 14 | ${locator.items[0].deliveryAddress.countryName} xpath=//td[@class='nameField'][./text()='Адреса поставки']/following-sibling::td[1] |
17 | -${locator.items[0].deliveryDate} xpath=//td[./text()='Кінцева дата поставки']/following-sibling::td[1] | |
18 | -${locator.items[0].classification.scheme} xpath=//td[@class = 'nameField'][./text()='Клас CPV'] | |
15 | +${locator.items[0].deliveryDate.endDate} xpath=//td[./text()='Кінцева дата поставки']/following-sibling::td[1] | |
16 | +${locator.items[0].classification.scheme} xpath=//td[@class = 'nameField'][./text()='Клас CPV'] | |
17 | +${locator.items[0].classification.id} xpath=//td[./text()='Клас CPV']/following-sibling::td[1]/span[1] | |
18 | +${locator.items[0].classification.description} xpath=//td[./text()='Клас CPV']/following-sibling::td[1]/span[2] | |
19 | 19 | ${locator.items[0].additionalClassifications[0].scheme} xpath=//td[@class = 'nameField'][./text()='Клас ДКПП'] |
20 | +${locator.items[0].additionalClassifications[0].id} xpath=//td[./text()='Клас ДКПП']/following-sibling::td[1]/span[1] | |
21 | +${locator.items[0].additionalClassifications[0].description} xpath=//td[./text()='Клас ДКПП']/following-sibling::td[1]/span[2] | |
22 | +${locator.items[0].quantity} xpath=//td[./text()='Кількість']/following-sibling::td[1]/span[1] | |
23 | +${locator.items[0].unit.code} xpath=//td[./text()='Кількість']/following-sibling::td[1]/span[2] | |
24 | +${locator.questions[0].title} xpath=//div[@class = 'question relative']//div[@class = 'title'] | |
25 | +${locator.questions[0].description} xpath = //div[@class='text'] | |
26 | +${locator.questions[0].date} xpath = //div[@class='date'] | |
27 | +${locator.questions[0].answer} xpath=//div[@class = 'answer relative']//div[@class = 'text'] | |
20 | 28 | |
21 | 29 | *** Keywords *** |
22 | 30 | Підготувати клієнт для користувача |
... | ... | @@ -34,7 +42,6 @@ ${locator.items[0].additionalClassifications[0].scheme} xpath=//td[@class = 'n |
34 | 42 | Login |
35 | 43 | [Arguments] @{ARGUMENTS} |
36 | 44 | Wait Until Page Contains Element name=email 10 |
37 | - Input text name=email mail | |
38 | 45 | Sleep 1 |
39 | 46 | Input text name=email ${USERS.users['${username}'].login} |
40 | 47 | Sleep 2 |
... | ... | @@ -62,30 +69,34 @@ Pre Login |
62 | 69 | ${description}= Get From Dictionary ${ARGUMENTS[1].data} description |
63 | 70 | ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount |
64 | 71 | ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount |
72 | + | |
65 | 73 | ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description |
66 | 74 | ${quantity}= Get From Dictionary ${items[0]} quantity |
67 | 75 | ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName |
68 | 76 | ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
69 | 77 | ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date} |
70 | 78 | ${cpv}= Convert To String Картонки |
71 | - ${cpv_id}= Get From Dictionary ${items[0].classification} id | |
72 | - ${cpv_id1}= Replace String ${cpv_id} - _ | |
79 | + ${cpv_id}= Get From Dictionary ${items[0].classification} id | |
80 | + ${cpv_id1}= Replace String ${cpv_id} - _ | |
73 | 81 | ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description |
74 | - ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
75 | - ${dkpp_id1}= Replace String ${dkpp_id} - _ | |
82 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
83 | + ${dkpp_id1}= Replace String ${dkpp_id} - _ | |
84 | + | |
76 | 85 | ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate |
77 | 86 | ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date} |
78 | 87 | ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate |
79 | 88 | ${end_date}= convert_date_to_slash_format ${end_date} |
80 | 89 | |
81 | 90 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
82 | - Wait Until Page Contains Element jquery=a[href="/tenders/new"] 100 | |
91 | + Wait Until Page Contains Element jquery=a[href="/tenders/new"] 30 | |
83 | 92 | Click Element jquery=a[href="/tenders/new"] |
84 | - Wait Until Page Contains Element name=tender_title 100 | |
93 | + Wait Until Page Contains Element name=tender_title 30 | |
85 | 94 | Input text name=tender_title ${title} |
86 | 95 | Input text name=tender_description ${description} |
87 | 96 | Input text name=tender_value_amount ${budget} |
88 | 97 | Input text name=tender_minimalStep_amount ${step_rate} |
98 | + | |
99 | +# Додати специфікацю початок | |
89 | 100 | Input text name=items[0][item_description] ${items_description} |
90 | 101 | Input text name=items[0][item_quantity] ${quantity} |
91 | 102 | Input text name=items[0][item_deliveryAddress_countryName] ${countryName} |
... | ... | @@ -103,15 +114,20 @@ Pre Login |
103 | 114 | Wait Until Page Contains ${dkpp_id} |
104 | 115 | Click Element xpath=//a[contains(@id,'${dkpp_id1}')] |
105 | 116 | Click Element xpath=.//*[@id='select'] |
117 | +# Додати специфікацю кінець | |
118 | + | |
106 | 119 | Unselect Frame |
120 | + Input text name=plan_date ${enquiry_end_date} | |
107 | 121 | Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date} |
108 | 122 | Input text name=tender_tenderPeriod_endDate ${end_date} |
109 | - Run Keyword if '${mode}' == 'multi' Додати предмет items | |
110 | - Wait Until Page Contains Element name=do 100 | |
111 | - Click Element name=do | |
112 | - Wait Until Page Contains Element xpath=//a[contains(@class, 'button pubBtn')] 100 | |
113 | - Click Element xpath=//a[contains(@class, 'button pubBtn')] | |
114 | - Wait Until Page Contains Тендер опубліковано 100 | |
123 | + | |
124 | + Додати предмет ${items[0]} 0 | |
125 | + Run Keyword if '${mode}' == 'multi' Додати багато предметів items | |
126 | + Unselect Frame | |
127 | + | |
128 | + Click Element xpath= //button[@value='publicate'] | |
129 | + Wait Until Page Contains Тендер опубліковано 30 | |
130 | + | |
115 | 131 | ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2] |
116 | 132 | ${Ids}= Convert To String ${tender_UAid} |
117 | 133 | Run keyword if '${mode}' == 'multi' Set Multi Ids ${tender_UAid} |
... | ... | @@ -128,73 +144,84 @@ Set Multi Ids |
128 | 144 | [Arguments] @{ARGUMENTS} |
129 | 145 | [Documentation] |
130 | 146 | ... ${ARGUMENTS[0]} == items |
131 | - ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description | |
132 | - ${dkpp_id11}= Get From Dictionary ${items[1].additionalClassifications[0]} id | |
147 | + ... ${ARGUMENTS[1]} == ${INDEX} | |
148 | + ${dkpp_desc1}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} description | |
149 | + ${dkpp_id11}= Get From Dictionary ${ARGUMENTS[0].additionalClassifications[0]} id | |
133 | 150 | ${dkpp_1id}= Replace String ${dkpp_id11} - _ |
134 | - ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description | |
135 | - ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id | |
136 | - ${dkpp_id2_1}= Replace String ${dkpp_id2} - _ | |
137 | - ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description | |
138 | - ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id | |
139 | - ${dkpp_id3_1}= Replace String ${dkpp_id3} - _ | |
140 | 151 | |
141 | 152 | Wait Until Page Contains Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] |
142 | 153 | Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] |
143 | - Wait Until Page Contains Element name=items[1][item_description] 100 | |
144 | - Input text name=items[1][item_description] ${description} | |
145 | - Input text name=items[1][item_quantity] ${quantity} | |
146 | - Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[2] | |
154 | + ${index} = Convert To Integer ${ARGUMENTS[1]} | |
155 | + ${index} = Convert To Integer ${index + 1} | |
156 | + Wait Until Page Contains Element name=items[${index}][item_description] 30 | |
157 | + Input text name=items[${index}][item_description] ${description} | |
158 | + Input text name=items[${index}][item_quantity] ${quantity} | |
159 | + | |
160 | + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[${index} + 1] | |
147 | 161 | Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] |
148 | 162 | Input text id=search ${cpv} |
149 | 163 | Wait Until Page Contains ${cpv_id} |
150 | 164 | Click Element xpath=//a[contains(@id,'${cpv_id1}')] |
151 | 165 | Click Element xpath=.//*[@id='select'] |
152 | 166 | Unselect Frame |
153 | - Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[2] | |
167 | + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[${index} + 1] | |
154 | 168 | Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] |
155 | 169 | Input text id=search ${dkpp_desc1} |
156 | 170 | Wait Until Page Contains ${dkpp_id11} |
157 | 171 | Click Element xpath=//a[contains(@id,'${dkpp_1id}')] |
158 | 172 | Click Element xpath=.//*[@id='select'] |
159 | 173 | Unselect Frame |
160 | - Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | |
161 | - Wait Until Page Contains Element name=items[2][item_description] 100 | |
162 | - Input text name=items[2][item_description] ${description} | |
163 | - Input text name=items[2][item_quantity] ${quantity} | |
164 | - Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[3] | |
165 | - Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | |
166 | - Input text id=search ${cpv} | |
167 | - Wait Until Page Contains ${cpv_id} | |
168 | - Click Element xpath=//a[contains(@id,'${cpv_id1}')] | |
169 | - Click Element xpath=.//*[@id='select'] | |
170 | - Unselect Frame | |
171 | - Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[3] | |
172 | - Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | |
173 | - Input text id=search ${dkpp_desc2} | |
174 | - Wait Until Page Contains ${dkpp_id2} | |
175 | - Click Element xpath=//a[contains(@id,'${dkpp_id2_1}')] | |
176 | - Click Element xpath=.//*[@id='select'] | |
177 | - Unselect Frame | |
178 | - Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі'] | |
179 | - Wait Until Page Contains Element name=items[3][item_description] 100 | |
180 | - Input text name=items[3][item_description] ${description} | |
181 | - Input text name=items[3][item_quantity] ${quantity} | |
182 | - Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[4] | |
183 | - Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')] | |
184 | - Input text id=search ${cpv} | |
185 | - Wait Until Page Contains ${cpv_id} | |
186 | - Click Element xpath=//a[contains(@id,'${cpv_id1}')] | |
187 | - Click Element xpath=.//*[@id='select'] | |
188 | - Unselect Frame | |
189 | - Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[4] | |
190 | - Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')] | |
191 | - Input text id=search ${dkpp_desc3} | |
192 | - Wait Until Page Contains ${dkpp_id3} | |
193 | - Click Element xpath=//a[contains(@id,'${dkpp_id3_1}')] | |
194 | - Click Element xpath=.//*[@id='select'] | |
195 | - Unselect Frame | |
196 | - Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date} | |
197 | - Input text name=tender_tenderPeriod_endDate ${end_date} | |
174 | + Capture Page Screenshot | |
175 | + | |
176 | +Додати багато предметів | |
177 | + [Arguments] @{ARGUMENTS} | |
178 | + [Documentation] | |
179 | + ... ${ARGUMENTS[0]} == items | |
180 | + ${Items_length}= Get Length ${items} | |
181 | + : FOR ${INDEX} IN RANGE 1 ${Items_length} | |
182 | + \ Додати предмет ${items[${INDEX}]} ${INDEX} | |
183 | + | |
184 | +додати предмети закупівлі | |
185 | + [Arguments] @{ARGUMENTS} | |
186 | + [Documentation] | |
187 | + ... ${ARGUMENTS[0]} = username | |
188 | + ... ${ARGUMENTS[1]} = ${TENDER_UAID} | |
189 | + ... ${ARGUMENTS[2]} = 3 | |
190 | + ${tender_data}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi | |
191 | + | |
192 | + ${items}= Get From Dictionary ${tender_data.data} items | |
193 | + ${description}= Get From Dictionary ${tender_data.data} description | |
194 | + ${quantity}= Get From Dictionary ${items[0]} quantity | |
195 | + ${cpv}= Convert To String Картонки | |
196 | + ${cpv_id}= Get From Dictionary ${items[0].classification} id | |
197 | + ${cpv_id1}= Replace String ${cpv_id} - _ | |
198 | + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description | |
199 | + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id | |
200 | + ${dkpp_id1}= Replace String ${dkpp_id} - _ | |
201 | + | |
202 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
203 | + Run keyword if '${TEST NAME}' == 'Можливість додати позицію закупівлі в тендер' додати позицію | |
204 | + Run keyword if '${TEST NAME}' != 'Можливість додати позицію закупівлі в тендер' видалити позиції | |
205 | + | |
206 | +додати позицію | |
207 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
208 | + Wait Until Page Contains Element xpath=//a[./text()='Редагувати'] 30 | |
209 | + Click Element xpath=//a[./text()='Редагувати'] | |
210 | + Додати багато предметів ${ARGUMENTS[2]} | |
211 | + Wait Until Page Contains Element xpath=//button[./text()='Зберегти'] 30 | |
212 | + Click Element xpath=//button[./text()='Зберегти'] | |
213 | + | |
214 | +видалити позиції | |
215 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
216 | + Wait Until Page Contains Element xpath=//a[./text()='Редагувати'] 30 | |
217 | + Click Element xpath=//a[./text()='Редагувати'] | |
218 | + : FOR ${INDEX} IN RANGE 1 ${ARGUMENTS[2]}-1 | |
219 | + \ sleep 5 | |
220 | + \ Click Element xpath=//a[@class='deleteMultiItem'][last()] | |
221 | + \ sleep 5 | |
222 | + \ Click Element xpath=//a[@class='jBtn green'] | |
223 | + Wait Until Page Contains Element xpath=//button[./text()='Зберегти'] 30 | |
224 | + Click Element xpath=//button[./text()='Зберегти'] | |
198 | 225 | |
199 | 226 | Пошук тендера по ідентифікатору |
200 | 227 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -223,10 +250,10 @@ Set Multi Ids |
223 | 250 | ${title}= Get From Dictionary ${ARGUMENTS[2].data} title |
224 | 251 | ${description}= Get From Dictionary ${ARGUMENTS[2].data} description |
225 | 252 | |
226 | - | |
227 | 253 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
228 | 254 | netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
229 | - | |
255 | + sleep 1 | |
256 | + Execute Javascript window.scroll(2500,2500) | |
230 | 257 | Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20 |
231 | 258 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] |
232 | 259 | Wait Until Page Contains Element name=title 20 |
... | ... | @@ -246,8 +273,9 @@ Set Multi Ids |
246 | 273 | |
247 | 274 | ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer |
248 | 275 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
249 | - netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
250 | 276 | |
277 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
278 | + Execute Javascript window.scroll(1500,1500) | |
251 | 279 | Wait Until Page Contains Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] 20 |
252 | 280 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] |
253 | 281 | Wait Until Page Contains Element xpath=//textarea[@name='answer'] 20 |
... | ... | @@ -268,6 +296,7 @@ Set Multi Ids |
268 | 296 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
269 | 297 | netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
270 | 298 | sleep 1 |
299 | + Execute Javascript window.scroll(1500,1500) | |
271 | 300 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Скарги']] |
272 | 301 | Wait Until Page Contains Element name=title 20 |
273 | 302 | Input text name=title ${complaint} |
... | ... | @@ -288,12 +317,11 @@ Set Multi Ids |
288 | 317 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
289 | 318 | netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} |
290 | 319 | sleep 1 |
320 | + Execute Javascript window.scroll(1500,1500) | |
291 | 321 | Click Element xpath=//a[@class='reverse openCPart'][span[text()='Скарги']] |
292 | 322 | Wait Until Page Contains ${complaint} 30 |
293 | 323 | Capture Page Screenshot |
294 | 324 | |
295 | - | |
296 | - | |
297 | 325 | Внести зміни в тендер |
298 | 326 | # Тест написано для уже існуючого тендеру, що знаходиться у чернетках користувача |
299 | 327 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -316,6 +344,16 @@ Set Multi Ids |
316 | 344 | Wait Until Page Contains ${ARGUMENTS[1]} 30 |
317 | 345 | Capture Page Screenshot |
318 | 346 | |
347 | +обновити сторінку з тендером | |
348 | + [Arguments] @{ARGUMENTS} | |
349 | + [Documentation] | |
350 | + ... ${ARGUMENTS[0]} = username | |
351 | + ... ${ARGUMENTS[1]} = tenderUaId | |
352 | + | |
353 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
354 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
355 | + Reload Page | |
356 | + | |
319 | 357 | отримати інформацію із тендера |
320 | 358 | [Arguments] @{ARGUMENTS} |
321 | 359 | [Documentation] |
... | ... | @@ -327,13 +365,13 @@ Set Multi Ids |
327 | 365 | |
328 | 366 | отримати тест із поля і показати на сторінці |
329 | 367 | [Arguments] ${fieldname} |
330 | - sleep 5 | |
368 | + sleep 1 | |
331 | 369 | ${return_value}= Get Text ${locator.${fieldname}} |
332 | 370 | [return] ${return_value} |
333 | 371 | |
334 | 372 | отримати інформацію про title |
335 | 373 | ${title}= отримати тест із поля і показати на сторінці title |
336 | - [return] ${title} | |
374 | + [return] ${title.split('.')[0]} | |
337 | 375 | |
338 | 376 | отримати інформацію про description |
339 | 377 | ${description}= отримати тест із поля і показати на сторінці description |
... | ... | @@ -355,10 +393,12 @@ Set Multi Ids |
355 | 393 | |
356 | 394 | отримати інформацію про enquiryPeriod.endDate |
357 | 395 | ${enquiryPeriodEndDate}= отримати тест із поля і показати на сторінці enquiryPeriod.endDate |
396 | + ${enquiryPeriodEndDate}= subtract_from_time ${enquiryPeriodEndDate} 6 5 | |
358 | 397 | [return] ${enquiryPeriodEndDate} |
359 | 398 | |
360 | 399 | отримати інформацію про tenderPeriod.endDate |
361 | 400 | ${tenderPeriodEndDate}= отримати тест із поля і показати на сторінці tenderPeriod.endDate |
401 | + ${tenderPeriodEndDate}= subtract_from_time ${tenderPeriodEndDate} 11 0 | |
362 | 402 | [return] ${tenderPeriodEndDate} |
363 | 403 | |
364 | 404 | отримати інформацію про items[0].deliveryAddress.countryName |
... | ... | @@ -371,4 +411,93 @@ Set Multi Ids |
371 | 411 | |
372 | 412 | отримати інформацію про items[0].additionalClassifications[0].scheme |
373 | 413 | ${additionalClassificationsScheme}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].scheme |
374 | - [return] ${additionalClassificationsScheme.split(' ')[1]} | |
\ No newline at end of file | ||
414 | + [return] ${additionalClassificationsScheme.split(' ')[1]} | |
415 | + | |
416 | +отримати інформацію про questions[0].title | |
417 | + sleep 1 | |
418 | + Click Element xpath=//a[@class='reverse tenderLink'] | |
419 | + sleep 1 | |
420 | + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] | |
421 | + ${questionsTitle}= отримати тест із поля і показати на сторінці questions[0].title | |
422 | + ${questionsTitle}= Convert To Lowercase ${questionsTitle} | |
423 | + [return] ${questionsTitle.capitalize().split('.')[0] + '.'} | |
424 | + | |
425 | +отримати інформацію про questions[0].description | |
426 | + ${questionsDescription}= отримати тест із поля і показати на сторінці questions[0].description | |
427 | + [return] ${questionsDescription} | |
428 | + | |
429 | +отримати інформацію про questions[0].date | |
430 | + ${questionsDate}= отримати тест із поля і показати на сторінці questions[0].date | |
431 | + log ${questionsDate} | |
432 | + [return] ${questionsDate} | |
433 | + | |
434 | +отримати інформацію про questions[0].answer | |
435 | + sleep 1 | |
436 | + Click Element xpath=//a[@class='reverse tenderLink'] | |
437 | + sleep 1 | |
438 | + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] | |
439 | + ${questionsAnswer}= отримати тест із поля і показати на сторінці questions[0].answer | |
440 | + [return] ${questionsAnswer} | |
441 | + | |
442 | +отримати інформацію про items[0].deliveryDate.endDate | |
443 | + ${deliveryDateEndDate}= отримати тест із поля і показати на сторінці items[0].deliveryDate.endDate | |
444 | + ${deliveryDateEndDate}= subtract_from_time ${deliveryDateEndDate} 15 0 | |
445 | + [return] ${deliveryDateEndDate} | |
446 | + | |
447 | +отримати інформацію про items[0].classification.id | |
448 | + ${classificationId}= отримати тест із поля і показати на сторінці items[0].classification.id | |
449 | + [return] ${classificationId} | |
450 | + | |
451 | +отримати інформацію про items[0].classification.description | |
452 | + ${classificationDescription}= отримати тест із поля і показати на сторінці items[0].classification.description | |
453 | + ${classificationDescription}= Run keyword if '${classificationDescription}' == 'Картонки' Convert To String Cartons | |
454 | + [return] ${classificationDescription} | |
455 | + | |
456 | +отримати інформацію про items[0].additionalClassifications[0].id | |
457 | + ${additionalClassificationsId}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].id | |
458 | + [return] ${additionalClassificationsId} | |
459 | + | |
460 | +отримати інформацію про items[0].additionalClassifications[0].description | |
461 | + ${additionalClassificationsDescription}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].description | |
462 | + ${additionalClassificationsDescription}= Convert To Lowercase ${additionalClassificationsDescription} | |
463 | + [return] ${additionalClassificationsDescription} | |
464 | + | |
465 | +отримати інформацію про items[0].quantity | |
466 | + ${itemsQuantity}= отримати тест із поля і показати на сторінці items[0].quantity | |
467 | + ${itemsQuantity}= Convert To Integer ${itemsQuantity} | |
468 | + [return] ${itemsQuantity} | |
469 | + | |
470 | +отримати інформацію про items[0].unit.code | |
471 | + ${unitCode}= отримати тест із поля і показати на сторінці items[0].unit.code | |
472 | + ${unitCode}= Run keyword if '${unitCode}'== 'кг' Convert To String KGM | |
473 | + [return] ${unitCode} | |
474 | + | |
475 | +отримати інформацію про procuringEntity.name | |
476 | + Log | Viewer can't see this information on Netcast console=yes | |
477 | + | |
478 | +отримати інформацію про enquiryPeriod.startDate | |
479 | + Log | Viewer can't see this information on Netcast console=yes | |
480 | + | |
481 | +отримати інформацію про tenderPeriod.startDate | |
482 | + Log | Viewer can't see this information on Netcast console=yes | |
483 | + | |
484 | +отримати інформацію про items[0].deliveryLocation.longitude | |
485 | + Log | Viewer can't see this information on Netcast console=yes | |
486 | + | |
487 | +отримати інформацію про items[0].deliveryLocation.latitude | |
488 | + Log | Viewer can't see this information on Netcast console=yes | |
489 | + | |
490 | +отримати інформацію про items[0].deliveryAddress.postalCode | |
491 | + Log | Viewer can't see this information on Netcast console=yes | |
492 | + | |
493 | +отримати інформацію про items[0].deliveryAddress.locality | |
494 | + Log | Viewer can't see this information on Netcast console=yes | |
495 | + | |
496 | +отримати інформацію про items[0].deliveryAddress.streetAddress | |
497 | + Log | Viewer can't see this information on Netcast console=yes | |
498 | + | |
499 | +отримати інформацію про items[0].deliveryAddress.region | |
500 | + Log | Viewer can't see this information on Netcast console=yes | |
501 | + | |
502 | +отримати інформацію про items[0].unit.name | |
503 | + Log | Viewer can't see this information on Netcast console=yes | |
... | ... |
... | ... | @@ -240,11 +240,8 @@ Set datetime |
240 | 240 | Wait Until Page Contains Element xpath=(//a[@class="row tender-info ng-scope"]) 20 |
241 | 241 | Sleep 5 |
242 | 242 | Click Element xpath=(//a[@class="row tender-info ng-scope"]) |
243 | -# debug | |
244 | 243 | Wait Until Page Contains Element xpath=//a[@class="ng-binding ng-scope"]|//span[@class="ng-binding ng-scope"] 30 |
245 | -# ${found_title}= Get Text xpath=//a[@class="ng-binding ng-scope"] | |
246 | -# Should Be Equal ${found_title} ${ARGUMENTS[1]} | |
247 | -#<span ng-switch-when="true" class="ng-binding ng-scope">UA-2015-09-02-000151</span> | |
244 | + | |
248 | 245 | |
249 | 246 | отримати інформацію із тендера |
250 | 247 | [Arguments] @{ARGUMENTS} |
... | ... | @@ -384,6 +381,7 @@ Set datetime |
384 | 381 | ${additional_classification_description}= Get Substring ${additional_classification_description}= 0 -2 |
385 | 382 | [return] ${additional_classification_description.split(' - ')[1]} |
386 | 383 | |
384 | +##item | |
387 | 385 | отримати інформацію про items[0].unit.name |
388 | 386 | ${unit_name}= отримати текст із поля і показати на сторінці items[0].unit.name |
389 | 387 | ${unit_name}= Run Keyword If '${unit_name}' == 'килограммы' Convert To String кілограм |
... | ... | @@ -406,20 +404,14 @@ Set datetime |
406 | 404 | ... ${ARGUMENTS[1]} = ${TENDER_UAID} |
407 | 405 | ... ${ARGUMENTS[2]} = 3 |
408 | 406 | ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi |
409 | - #${tender_data}= Add_time_for_GUI_FrontEnds ${ADDITIONAL_DATA} | |
410 | 407 | ${items}= Get From Dictionary ${ADDITIONAL_DATA.data} items |
411 | - | |
412 | 408 | Selenium2Library.Switch Browser ${ARGUMENTS[0]} |
413 | - #Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
414 | 409 | Wait Until Page Contains Element ${locator.edit_tender} 10 |
415 | 410 | Click Element ${locator.edit_tender} |
416 | - #Sleep 2 | |
417 | 411 | Wait Until Page Contains Element ${locator.edit.add_item} 10 |
418 | 412 | Input text ${locator.edit.description} description |
419 | 413 | Run keyword if '${TEST NAME}' == 'Можливість додати позицію закупівлі в тендер' додати позицію |
420 | -# debug | |
421 | 414 | Run keyword if '${TEST NAME}' != 'Можливість додати позицію закупівлі в тендер' забрати позицію |
422 | - #Sleep 2 | |
423 | 415 | Wait Until Page Contains Element ${locator.save} 10 |
424 | 416 | Click Element ${locator.save} |
425 | 417 | Wait Until Page Contains Element ${locator.description} 20 |
... | ... | @@ -462,8 +454,6 @@ Set datetime |
462 | 454 | Wait Until Page Contains ${ARGUMENTS[1]} 20 |
463 | 455 | |
464 | 456 | отримати інформацію про QUESTIONS[0].title |
465 | - #debug | |
466 | - #<span class="ng-binding">Уточнения</span> | |
467 | 457 | Wait Until Page Contains Element xpath=//span[contains(text(), "Уточнения")] 20 |
468 | 458 | Click Element xpath=//span[contains(text(), "Уточнения")] |
469 | 459 | Wait Until Page Contains Вы не можете задавать вопросы 20 |
... | ... |
... | ... | @@ -91,7 +91,7 @@ def test_tender_data(period_interval=2): |
91 | 91 | ], |
92 | 92 | "enquiryPeriod": { |
93 | 93 | "startDate": (now).isoformat(), |
94 | - "endDate": (now + timedelta(minutes=1)).isoformat() | |
94 | + "endDate": (now + timedelta(minutes=2)).isoformat() | |
95 | 95 | }, |
96 | 96 | "tenderPeriod": { |
97 | 97 | "startDate": (now + timedelta(minutes=2)).isoformat(), |
... | ... |
... | ... | @@ -195,4 +195,9 @@ def newtend_date_picker_index(isodate): |
195 | 195 | def Update_data_for_Newtend(INITIAL_TENDER_DATA): |
196 | 196 | #INITIAL_TENDER_DATA.data.items[0].classification['description'] = u"Картонки" |
197 | 197 | INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"openprocurement" |
198 | - return INITIAL_TENDER_DATA | |
\ No newline at end of file | ||
198 | + return INITIAL_TENDER_DATA | |
199 | + | |
200 | +def subtract_from_time(date_time,substr_min,substr_sec): | |
201 | + now = datetime.strptime(date_time,"%d.%m.%Y %H:%M") | |
202 | + now = (now - timedelta(minutes=int(substr_min), seconds = int (substr_sec) )).isoformat() | |
203 | + return now | |
\ No newline at end of file | ||
... | ... |
Please
register
or
login
to post a comment