Commit 246df4735b36df1f868e53e360be0874121f201e

Authored by yboi
1 parent df2eefdf

e-tender_+_netcast

@@ -107,7 +107,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai @@ -107,7 +107,7 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai
107 ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid 107 ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid
108 ### harcode Idis bacause issues on the E-tender side, to remove, 1 line: 108 ### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
109 ${tender_UAid}= Convert To String UA-2015-06-30-000012 109 ${tender_UAid}= Convert To String UA-2015-06-30-000012
110 - ${Ids} Create List ${tender_UAid} 110 + ${Ids} Create List ${tender_UAid}
111 [return] ${Ids} 111 [return] ${Ids}
112 112
113 get tender UAid 113 get tender UAid
@@ -125,8 +125,8 @@ Oтримати internal id по UAid @@ -125,8 +125,8 @@ Oтримати internal id по UAid
125 ${tender_id}= Fetch From Right ${current_location} / 125 ${tender_id}= Fetch From Right ${current_location} /
126 ### harcode Idis bacause issues on the E-tender side, to remove, 1 line: 126 ### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
127 ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2 127 ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2
128 - log ${internal_id}  
129 - [return] ${internal_id} 128 + log ${tender_id}
  129 + [return] ${tender_id}
130 130
131 Пошук тендера по ідентифікатору 131 Пошук тендера по ідентифікатору
132 [Arguments] @{ARGUMENTS} 132 [Arguments] @{ARGUMENTS}
@@ -135,12 +135,12 @@ Oтримати internal id по UAid @@ -135,12 +135,12 @@ Oтримати internal id по UAid
135 ... ${ARGUMENTS[1]} == tenderId 135 ... ${ARGUMENTS[1]} == tenderId
136 136
137 Switch browser ${ARGUMENTS[0]} 137 Switch browser ${ARGUMENTS[0]}
138 - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url} 138 + Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
139 Wait Until Page Contains Список закупівель 10 139 Wait Until Page Contains Список закупівель 10
140 - sleep 1  
141 - Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}  
142 - Click Link jquery=a[ng-click='search()']  
143 - sleep 2 140 + sleep 1
  141 + Input Text jquery=input[ng-change='search()'] ${ARGUMENTS[1]}
  142 + Click Link jquery=a[ng-click='search()']
  143 + sleep 2
144 Click Link jquery=a[href^="#/tenderDetailes"] 144 Click Link jquery=a[href^="#/tenderDetailes"]
145 Wait Until Page Contains ${ARGUMENTS[1]} 10 145 Wait Until Page Contains ${ARGUMENTS[1]} 10
146 sleep 1 146 sleep 1
@@ -372,7 +372,7 @@ Oтримати internal id по UAid @@ -372,7 +372,7 @@ Oтримати internal id по UAid
372 Maximize Browser Window 372 Maximize Browser Window
373 Wait Until Page Contains Мої закупівлі 100 373 Wait Until Page Contains Мої закупівлі 100
374 Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі'] 374 Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі']
375 - Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] 375 + Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] 100
376 Click Element xpath=//a[contains(@class, 'btn btn-info')] 376 Click Element xpath=//a[contains(@class, 'btn btn-info')]
377 Wait Until Page Contains Element id=title 377 Wait Until Page Contains Element id=title
378 Input text id=title ${title} 378 Input text id=title ${title}
@@ -381,6 +381,7 @@ Oтримати internal id по UAid @@ -381,6 +381,7 @@ Oтримати internal id по UAid
381 Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox'] 381 Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox']
382 Input text id=minimalStep ${step_rate} 382 Input text id=minimalStep ${step_rate}
383 Input text id=itemsDescription ${items_description} 383 Input text id=itemsDescription ${items_description}
  384 + DEBUG
384 Input text id=itemsQuantity ${quantity} 385 Input text id=itemsQuantity ${quantity}
385 Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram'] 386 Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram']
386 Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date} 387 Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date}
@@ -392,49 +393,50 @@ Oтримати internal id по UAid @@ -392,49 +393,50 @@ Oтримати internal id по UAid
392 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} 393 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}
393 394
394 Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification'] 395 Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification']
395 - Wait Until Page Contains Оберіть класифікатор CPV 100 396 + Wait Until Page Contains Element xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] 100
396 Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv} 397 Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv}
397 Wait Until Page Contains Картонки 100 398 Wait Until Page Contains Картонки 100
398 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[1]//td[1] 399 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[1]//td[1]
399 Wait Until Page Contains 44617100-9 Картонки 100 400 Wait Until Page Contains 44617100-9 Картонки 100
400 Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()'] 401 Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()']
401 402
402 - Wait Until Page Contains Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] 403 + Wait Until Page Contains Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] 100
403 Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] 404 Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification']
404 - Wait Until Page Contains Класифікатор ДКПП 100 405 + Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
405 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc0} 406 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc0}
406 Wait Until Page Contains ${dkpp_id0} 100 407 Wait Until Page Contains ${dkpp_id0} 100
407 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[2]//td[1] 408 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[2]//td[1]
408 Wait Until Page Contains 17.29.12-00.00 "Блоки, плити та пластини фільтрувальні, з паперової маси" 100 409 Wait Until Page Contains 17.29.12-00.00 "Блоки, плити та пластини фільтрувальні, з паперової маси" 100
409 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] 410 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
410 411
411 - Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 412 + Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
412 Click Element xpath=.//*[@id='myform']/tender-form/div/button 413 Click Element xpath=.//*[@id='myform']/tender-form/div/button
413 - Wait Until Page Contains Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2] 414 + Sleep 2
414 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2] 415 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2]
415 - Wait Until Page Contains Класифікатор ДКПП 100 416 + Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
416 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1} 417 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1}
417 Wait Until Page Contains ${dkpp_id1} 100 418 Wait Until Page Contains ${dkpp_id1} 100
418 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[3]//td[1] 419 Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[3]//td[1]
419 Wait Until Page Contains 17.21.99-00.00 "Роботи субпідрядні як частина виробництва гофрованих паперу й картону, паперової та картонної тари" 100 420 Wait Until Page Contains 17.21.99-00.00 "Роботи субпідрядні як частина виробництва гофрованих паперу й картону, паперової та картонної тари" 100
420 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] 421 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
421 422
422 - Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 423 + Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
423 Click Element xpath=.//*[@id='myform']/tender-form/div/button 424 Click Element xpath=.//*[@id='myform']/tender-form/div/button
424 - Wait Until Page Contains Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3] 425 + Sleep 2
425 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3] 426 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3]
426 - Wait Until Page Contains Класифікатор ДКПП 100 427 + Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
427 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2} 428 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2}
428 Wait Until Page Contains ${dkpp_id2} 100 429 Wait Until Page Contains ${dkpp_id2} 100
429 Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2] 430 Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2]
430 Wait Until Page Contains 17.22.12-40.00 "Вата; вироби з вати, інші" 100 431 Wait Until Page Contains 17.22.12-40.00 "Вата; вироби з вати, інші" 100
431 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] 432 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
432 433
433 - Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 434 + Sleep 2
  435 + Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
434 Click Element xpath=.//*[@id='myform']/tender-form/div/button 436 Click Element xpath=.//*[@id='myform']/tender-form/div/button
435 - Wait Until Page Contains Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] 437 + Wait Until Page Contains Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] 100
436 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] 438 Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4]
437 - Wait Until Page Contains Класифікатор ДКПП 100 439 + Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
438 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3} 440 Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3}
439 Wait Until Page Contains ${dkpp_id3} 100 441 Wait Until Page Contains ${dkpp_id3} 100
440 Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2] 442 Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2]
@@ -442,4 +444,13 @@ Oтримати internal id по UAid @@ -442,4 +444,13 @@ Oтримати internal id по UAid
442 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()'] 444 Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
443 445
444 Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] 446 Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
  447 + Capture Page Screenshot
445 Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit'] 448 Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
  449 + Wait Until Page Contains [ТЕСТУВАННЯ] 100
  450 + Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
  451 + ${tender_UAid}= Wait Until Keyword Succeeds 240sec 2sec get tender UAid
  452 +### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
  453 + ${tender_UAid}= Convert To String UA-2015-06-30-000012
  454 + ${id}= Oтримати internal id по UAid ${ARGUMENTS[0]} ${tender_UAid}
  455 + ${Ids} Create List ${tender_UAid} ${id}
  456 + [return] ${Ids}
@@ -15,15 +15,105 @@ ${locator.tenderPeriod.endDate} jquery=tender-procedure-info>div.row:contai @@ -15,15 +15,105 @@ ${locator.tenderPeriod.endDate} jquery=tender-procedure-info>div.row:contai
15 ${locator.enquiryPeriod.startDate} jquery=tender-procedure-info>div.row:contains("Початок періоду уточнень:")>:eq(1)> 15 ${locator.enquiryPeriod.startDate} jquery=tender-procedure-info>div.row:contains("Початок періоду уточнень:")>:eq(1)>
16 ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contains("Завершення періоду уточнень:")>:eq(1)> 16 ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contains("Завершення періоду уточнень:")>:eq(1)>
17 17
18 -  
19 *** Keywords *** 18 *** Keywords ***
20 Підготувати клієнт для користувача 19 Підготувати клієнт для користувача
21 - [Arguments] ${username} 20 + [Arguments] @{ARGUMENTS}
22 [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо 21 [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
23 - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username}  
24 - Set Window Position @{USERS.users['${username}'].position}  
25 - Set Window Size @{USERS.users['${username}'].size}  
26 - Log Variables 22 + ... ${ARGUMENTS[0]} == username
  23 + Open Browser ${BROKERS['${USERS.users['${ARGUMENTS[0]}'].broker}'].url} ${USERS.users['${ARGUMENTS[0]}'].browser} alias=${ARGUMENTS[0]}
  24 + Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
  25 + Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position}
  26 +
  27 +# login
  28 + Wait Until Page Contains Element name=siteLogin 100
  29 + Input text name=siteLogin ${BROKERS['${USERS.users['${username}'].broker}'].login}
  30 + Input text name=sitePass ${BROKERS['${USERS.users['${username}'].broker}'].password}
  31 + Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input
  32 +
  33 + Wait Until Page Contains Element jquery=a[href="/cabinet"]
  34 + Click Element jquery=a[href="/cabinet"]
  35 + Wait Until Page Contains Element name=email 100
  36 + Input text name=email mail
  37 + Sleep 1
  38 + Input text name=email ${USERS.users['${username}'].login}
  39 + Sleep 2
  40 + Input text name=psw ${USERS.users['${username}'].password}
  41 + Wait Until Page Contains Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет'] 100
  42 + Click Element xpath=//button[contains(@class, 'btn')][./text()='Вхід в кабінет']
  43 +
  44 +Створити тендер
  45 + [Arguments] @{ARGUMENTS}
  46 + [Documentation]
  47 + ... ${ARGUMENTS[0]} == username
  48 + ... ${ARGUMENTS[1]} == tender_data
  49 +
  50 + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
  51 + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
  52 + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
  53 + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount
  54 + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount
  55 + ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description
  56 + ${quantity}= Get From Dictionary ${items[0]} quantity
  57 + ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName
  58 + ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate
  59 + ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date}
  60 + ${cpv}= Get From Dictionary ${items[0].classification} description_ua
  61 + ${cpv_id}= Get From Dictionary ${items[0].classification} id
  62 + ${cpv_id1}= String.Replace String ${cpv_id} - _
  63 + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
  64 + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
  65 + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  66 + ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date}
  67 + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  68 + ${end_date}= convert_date_to_slash_format ${end_date}
  69 +
  70 + Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  71 + Wait Until Page Contains Element jquery=a[href="/tenders/new"] 100
  72 + Click Element jquery=a[href="/tenders/new"]
  73 + Wait Until Page Contains Element name=tender_title 100
  74 + Input text name=tender_title ${title}
  75 + Wait Until Page Contains Element name=tender_description 100
  76 + Input text name=tender_description ${description}
  77 + Wait Until Page Contains Element name=tender_value_amount 100
  78 + Input text name=tender_value_amount ${budget}
  79 + Wait Until Page Contains Element name=tender_minimalStep_amount 100
  80 + Input text name=tender_minimalStep_amount ${step_rate}
  81 + Wait Until Page Contains Element name=items[0][item_description] 100
  82 + Input text name=items[0][item_description] ${items_description}
  83 + Wait Until Page Contains Element name=items[0][item_quantity] 100
  84 + Input text name=items[0][item_quantity] ${quantity}
  85 + Wait Until Page Contains Element name=items[0][item_deliveryAddress_countryName] 100
  86 + Input text name=items[0][item_deliveryAddress_countryName] ${countryName}
  87 + Wait Until Page Contains Element name=items[0][item_deliveryDate_endDate] 100
  88 + Input text name=items[0][item_deliveryDate_endDate] ${delivery_end_date}
  89 + Wait Until Page Contains Element xpath=//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'] 100
  90 + Click Element xpath=//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником']
  91 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')]
  92 + Input text id=search ${cpv}
  93 + Wait Until Page Contains ${cpv_id}
  94 + Click Element xpath=//a[contains(@id,'${cpv_id1}')]
  95 + Click Element xpath=.//*[@id='select']
  96 + Unselect Frame
  97 + Wait Until Page Contains Element xpath=//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'] 100
  98 + Click Element xpath=//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником']
  99 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')]
  100 + Input text id=search ${dkpp_desc}
  101 + Wait Until Page Contains ${dkpp_id}
  102 + Click Element xpath=//a[contains(@id,'${dkpp_id}')]
  103 + Click Element xpath=.//*[@id='select']
  104 + Unselect Frame
  105 + Wait Until Page Contains Element name=tender_enquiryPeriod_endDate 100
  106 + Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date}
  107 + Wait Until Page Contains Element name=tender_tenderPeriod_endDate 100
  108 + Input text name=tender_tenderPeriod_endDate ${end_date}
  109 + Wait Until Page Contains Element name=do 100
  110 + Click Element name=do
  111 + Wait Until Page Contains Element xpath=//a[contains(@class, 'button pubBtn')] 100
  112 + Click Element xpath=//a[contains(@class, 'button pubBtn')]
  113 + Wait Until Page Contains Тендер опубліковано 100
  114 + ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2]
  115 + ${Ids} Create List ${tender_UAid}
  116 + [return] ${Ids}
27 117
28 Пошук тендера по ідентифікатору 118 Пошук тендера по ідентифікатору
29 [Arguments] @{ARGUMENTS} 119 [Arguments] @{ARGUMENTS}
@@ -46,4 +136,154 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai @@ -46,4 +136,154 @@ ${locator.enquiryPeriod.endDate} jquery=tender-procedure-info>div.row:contai
46 Click Link jquery=a[href^="#/tenderDetailes"] 136 Click Link jquery=a[href^="#/tenderDetailes"]
47 Wait Until Page Contains ${ARGUMENTS[1]} 10 137 Wait Until Page Contains ${ARGUMENTS[1]} 10
48 sleep 1 138 sleep 1
49 - Capture Page Screenshot  
  139 + Capture Page Screenshot
  140 +
  141 +Багатопредметний тендер
  142 + [Arguments] @{ARGUMENTS}
  143 + [Documentation]
  144 + ... ${ARGUMENTS[0]} == username
  145 + ... ${ARGUMENTS[1]} == tender_data
  146 + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
  147 + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
  148 + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
  149 + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount
  150 + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount
  151 + ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description
  152 + ${quantity}= Get From Dictionary ${items[0]} quantity
  153 + ${countryName}= Get From Dictionary ${ARGUMENTS[1].data.procuringEntity.address} countryName
  154 + ${delivery_end_date}= Get From Dictionary ${items[0].deliveryDate} endDate
  155 + ${delivery_end_date}= convert_date_to_slash_format ${delivery_end_date}
  156 + ${cpv}= Get From Dictionary ${items[0].classification} description_ua
  157 + ${cpv_id}= Get From Dictionary ${items[0].classification} id
  158 + ${cpv_id1}= String.Replace String ${cpv_id} - _
  159 + ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
  160 + ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description
  161 + ${dkpp_id11}= Get From Dictionary ${items[1].additionalClassifications[0]} id
  162 + ${dkpp_1id}= String.Replace String ${dkpp_id11} - _
  163 + ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description
  164 + ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id
  165 + ${dkpp_id2_1}= String.Replace String ${dkpp_id2} - _
  166 + ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description
  167 + ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id
  168 + ${dkpp_id3_1}= String.Replace String ${dkpp_id3} - _
  169 + ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
  170 + ${dkpp_id1}= String.Replace String ${dkpp_id} - _
  171 + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  172 + ${enquiry_end_date}= convert_date_to_slash_format ${enquiry_end_date}
  173 + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  174 + ${end_date}= convert_date_to_slash_format ${end_date}
  175 +
  176 + Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  177 + Wait Until Page Contains Element jquery=a[href="/tenders/new"] 100
  178 + Click Element jquery=a[href="/tenders/new"]
  179 + Wait Until Page Contains Element name=tender_title 100
  180 + Input text name=tender_title ${title}
  181 + Wait Until Page Contains Element name=tender_description 100
  182 + Input text name=tender_description ${description}
  183 + Wait Until Page Contains Element name=tender_value_amount 100
  184 + Input text name=tender_value_amount ${budget}
  185 + Wait Until Page Contains Element name=tender_minimalStep_amount 100
  186 + Input text name=tender_minimalStep_amount ${step_rate}
  187 + Wait Until Page Contains Element name=items[0][item_description] 100
  188 + Input text name=items[0][item_description] ${items_description}
  189 + Wait Until Page Contains Element name=items[0][item_quantity] 100
  190 + Input text name=items[0][item_quantity] ${quantity}
  191 + Wait Until Page Contains Element name=items[0][item_deliveryAddress_countryName] 100
  192 + Input text name=items[0][item_deliveryAddress_countryName] ${countryName}
  193 + Wait Until Page Contains Element name=items[0][item_deliveryDate_endDate] 100
  194 + Input text name=items[0][item_deliveryDate_endDate] ${delivery_end_date}
  195 + Wait Until Page Contains Element xpath=//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'] 100
  196 + Click Element xpath=//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником']
  197 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')]
  198 + Input text id=search ${cpv}
  199 + Wait Until Page Contains ${cpv_id}
  200 + Click Element xpath=//a[contains(@id,'${cpv_id1}')]
  201 + Click Element xpath=.//*[@id='select']
  202 + Unselect Frame
  203 + Wait Until Page Contains Element xpath=//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'] 100
  204 + Click Element xpath=//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником']
  205 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')]
  206 + Input text id=search ${dkpp_desc}
  207 + Wait Until Page Contains ${dkpp_id}
  208 + Click Element xpath=//a[contains(@id,'${dkpp_id1}')]
  209 + Click Element xpath=.//*[@id='select']
  210 + Unselect Frame
  211 + Wait Until Page Contains Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  212 + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  213 + Wait Until Page Contains Element name=items[1][item_description] 100
  214 + Input text name=items[1][item_description] ${description}
  215 + Wait Until Page Contains Element name=items[1][item_quantity] 100
  216 + Input text name=items[1][item_quantity] ${quantity}
  217 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[2] 100
  218 + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[2]
  219 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')]
  220 + Input text id=search ${cpv}
  221 + Wait Until Page Contains ${cpv_id}
  222 + Click Element xpath=//a[contains(@id,'${cpv_id1}')]
  223 + Click Element xpath=.//*[@id='select']
  224 + Unselect Frame
  225 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[2] 100
  226 + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[2]
  227 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')]
  228 + Input text id=search ${dkpp_desc1}
  229 + Wait Until Page Contains ${dkpp_id11}
  230 + Click Element xpath=//a[contains(@id,'${dkpp_1id}')]
  231 + Click Element xpath=.//*[@id='select']
  232 + Unselect Frame
  233 + Wait Until Page Contains Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  234 + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  235 + Wait Until Page Contains Element name=items[2][item_description] 100
  236 + Input text name=items[2][item_description] ${description}
  237 + Wait Until Page Contains Element name=items[2][item_quantity] 100
  238 + Input text name=items[2][item_quantity] ${quantity}
  239 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[3] 100
  240 + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[3]
  241 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')]
  242 + Input text id=search ${cpv}
  243 + Wait Until Page Contains ${cpv_id}
  244 + Click Element xpath=//a[contains(@id,'${cpv_id1}')]
  245 + Click Element xpath=.//*[@id='select']
  246 + Unselect Frame
  247 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[3] 100
  248 + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[3]
  249 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')]
  250 + Input text id=search ${dkpp_desc2}
  251 + Wait Until Page Contains ${dkpp_id2}
  252 + Click Element xpath=//a[contains(@id,'${dkpp_id2_1}')]
  253 + Click Element xpath=.//*[@id='select']
  254 + Unselect Frame
  255 + Wait Until Page Contains Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  256 + Click Element xpath=//a[contains(@class, 'addMultiItem')][./text()='Додати предмет закупівлі']
  257 + Wait Until Page Contains Element name=items[3][item_description] 100
  258 + Input text name=items[3][item_description] ${description}
  259 + Wait Until Page Contains Element name=items[3][item_quantity] 100
  260 + Input text name=items[3][item_quantity] ${quantity}
  261 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[4] 100
  262 + Click Element xpath=(//a[contains(@data-class, 'cpv')][./text()='Визначити за довідником'])[4]
  263 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/cpv/uk.htm?relation=true')]
  264 + Input text id=search ${cpv}
  265 + Wait Until Page Contains ${cpv_id}
  266 + Click Element xpath=//a[contains(@id,'${cpv_id1}')]
  267 + Click Element xpath=.//*[@id='select']
  268 + Unselect Frame
  269 + Wait Until Page Contains Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[4] 100
  270 + Click Element xpath=(//a[contains(@data-class, 'dkpp')][./text()='Визначити за довідником'])[4]
  271 + Select Frame xpath=//iframe[contains(@src,'/js/classifications/dkpp/uk.htm?relation=true')]
  272 + Input text id=search ${dkpp_desc3}
  273 + Wait Until Page Contains ${dkpp_id3}
  274 + Click Element xpath=//a[contains(@id,'${dkpp_id3_1}')]
  275 + Click Element xpath=.//*[@id='select']
  276 + Unselect Frame
  277 + Wait Until Page Contains Element name=tender_enquiryPeriod_endDate 100
  278 + Input text name=tender_enquiryPeriod_endDate ${enquiry_end_date}
  279 + Wait Until Page Contains Element name=tender_tenderPeriod_endDate 100
  280 + Input text name=tender_tenderPeriod_endDate ${end_date}
  281 + Wait Until Page Contains Element name=do 100
  282 + Click Element name=do
  283 + Wait Until Page Contains Element xpath=//a[contains(@class, 'button pubBtn')] 100
  284 + Click Element xpath=//a[contains(@class, 'button pubBtn')]
  285 + Wait Until Page Contains Тендер опубліковано 100
  286 + ${tender_UAid}= Get Text xpath=//*/section[6]/table/tbody/tr[2]/td[2]
  287 + ${id}= Get Text xpath=//*/section[6]/table/tbody/tr[1]/td[2]
  288 + ${Ids} Create List ${tender_UAid} ${id}
  289 + [return] ${Ids}
@@ -24,5 +24,8 @@ Publicbid: @@ -24,5 +24,8 @@ Publicbid:
24 period_interval: 2 24 period_interval: 2
25 Netcast: 25 Netcast:
26 keywords_file: netcast 26 keywords_file: netcast
27 - url: http://dz2.byustudio.in.ua 27 + url: "http://dz2.byustudio.in.ua"
  28 + login: admin
  29 + password: uStudio
28 timout_on_wait: 15 30 timout_on_wait: 15
  31 + period_interval: 2
@@ -74,3 +74,12 @@ users: @@ -74,3 +74,12 @@ users:
74 browser: chrome 74 browser: chrome
75 position: [0, 450] 75 position: [0, 450]
76 size: [640, 450] 76 size: [640, 450]
  77 + Netcast_Owner:
  78 + broker: Netcast
  79 + username: Netcasttest
  80 + homepage: "http://dz2.byustudio.in.ua"
  81 + login: ovramet.s@gmail.com
  82 + password: Password1
  83 + browser: firefox
  84 + position: [0, 450]
  85 + size: [640, 450]
@@ -65,7 +65,8 @@ def test_tender_data(period_interval=2): @@ -65,7 +65,8 @@ def test_tender_data(period_interval=2):
65 "classification": { 65 "classification": {
66 "scheme": u"CPV", 66 "scheme": u"CPV",
67 "id": u"44617100-9", 67 "id": u"44617100-9",
68 - "description": u"Cartons" 68 + "description": u"Cartons",
  69 + "description_ua": u"Картонки",
69 }, 70 },
70 "additionalClassifications": [ 71 "additionalClassifications": [
71 { 72 {
@@ -234,7 +235,8 @@ def test_tender_data_multiple_lots(period_interval=2): @@ -234,7 +235,8 @@ def test_tender_data_multiple_lots(period_interval=2):
234 "classification": { 235 "classification": {
235 "scheme": u"CPV", 236 "scheme": u"CPV",
236 "id": u"44617100-9", 237 "id": u"44617100-9",
237 - "description": u"Cartons" 238 + "description": u"Cartons",
  239 + "description_ua": u"Картонки",
238 }, 240 },
239 "additionalClassifications": [ 241 "additionalClassifications": [
240 { 242 {
@@ -353,12 +355,12 @@ def test_tender_data_multiple_lots(period_interval=2): @@ -353,12 +355,12 @@ def test_tender_data_multiple_lots(period_interval=2):
353 } 355 }
354 ], 356 ],
355 "enquiryPeriod": { 357 "enquiryPeriod": {
356 - "startDate": (now + timedelta(minutes=2)).isoformat(),  
357 - "endDate": (now + timedelta(minutes=3)).isoformat() 358 + "startDate": (now + timedelta(minutes=3)).isoformat(),
  359 + "endDate": (now + timedelta(minutes=4)).isoformat()
358 }, 360 },
359 "tenderPeriod": { 361 "tenderPeriod": {
360 - "startDate": (now + timedelta(minutes=2)).isoformat(),  
361 - "endDate": (now + timedelta(minutes=(2+period_interval))).isoformat() 362 + "startDate": (now + timedelta(minutes=4)).isoformat(),
  363 + "endDate": (now + timedelta(minutes=(5+period_interval))).isoformat()
362 } 364 }
363 } 365 }
364 366
@@ -21,9 +21,15 @@ from .initial_data import ( @@ -21,9 +21,15 @@ from .initial_data import (
21 ) 21 )
22 22
23 TIMEZONE = timezone('Europe/Kiev') 23 TIMEZONE = timezone('Europe/Kiev')
  24 +
24 def get_date(): 25 def get_date():
25 return datetime.now().isoformat() 26 return datetime.now().isoformat()
26 27
  28 +def convert_date_to_slash_format(isodate):
  29 + iso_dt=parse_date(isodate)
  30 + date_string = iso_dt.strftime("%d/%m/%Y")
  31 + return date_string
  32 +
27 def convert_date_to_etender_format(isodate): 33 def convert_date_to_etender_format(isodate):
28 iso_dt=parse_date(isodate) 34 iso_dt=parse_date(isodate)
29 date_string = iso_dt.strftime("%d-%m-%Y") 35 date_string = iso_dt.strftime("%d-%m-%Y")
Please register or login to post a comment