Showing
1 changed file
with
16 additions
and
19 deletions
| ... | ... | @@ -3,7 +3,6 @@ Library Selenium2Screenshots |
| 3 | 3 | Library String |
| 4 | 4 | Library DateTime |
| 5 | 5 | Library Selenium2Library |
| 6 | -Library ApiCommands | |
| 7 | 6 | Library Collections |
| 8 | 7 | |
| 9 | 8 | |
| ... | ... | @@ -14,6 +13,11 @@ ${LOGIN} r.zaporozhets@smartweb.com.ua |
| 14 | 13 | ${PASSWORD} 1234 |
| 15 | 14 | |
| 16 | 15 | *** Keywords *** |
| 16 | +Підготувати дані для оголошення тендера | |
| 17 | + ${INITIAL_TENDER_DATA}= prepare_prom_test_tender_data | |
| 18 | + [return] ${INITIAL_TENDER_DATA} | |
| 19 | + | |
| 20 | + | |
| 17 | 21 | Підготувати клієнт для користувача |
| 18 | 22 | [Arguments] ${username} |
| 19 | 23 | log many @{ARGUMENTS} |
| ... | ... | @@ -33,36 +37,31 @@ Login |
| 33 | 37 | Input text id=password ${PASSWORD} |
| 34 | 38 | Click Button id=submit_login_button |
| 35 | 39 | |
| 36 | -#TODO: tender data should pass as args make converter from client initial data to prom initial data | |
| 37 | - | |
| 38 | 40 | Створити тендер |
| 39 | 41 | [Arguments] @{ARGUMENTS} |
| 40 | 42 | log many @{ARGUMENTS} |
| 41 | - | |
| 42 | 43 | Go to homepage |
| 43 | - Sleep 10 | |
| 44 | 44 | Wait Until Page Contains Element id=phone_email |
| 45 | - | |
| 46 | 45 | Login |
| 47 | - Sleep 3 | |
| 48 | 46 | |
| 49 | 47 | ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate |
| 48 | + ${start_date}= convert_date_to_prom_format ${start_date} | |
| 50 | 49 | ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate |
| 51 | - | |
| 52 | - ${enquiry_start_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} startDate | |
| 50 | + ${end_date}= convert_date_to_prom_format ${end_date} | |
| 53 | 51 | ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate |
| 52 | + ${enquiry_end_date}= convert_date_to_prom_format ${enquiry_end_date} | |
| 54 | 53 | |
| 55 | 54 | ${items}= Get From Dictionary ${ARGUMENTS[1].data} items |
| 56 | 55 | ${delivery_date}= Get From Dictionary ${items[0].deliveryDate} endDate |
| 57 | - | |
| 58 | 56 | ${title}= Get From Dictionary ${ARGUMENTS[1].data} title |
| 59 | 57 | ${description}= Get From Dictionary ${ARGUMENTS[1].data} description |
| 60 | - | |
| 61 | 58 | ${quantity}= Get From Dictionary ${items[0]} quantity |
| 62 | 59 | ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount |
| 63 | 60 | ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount |
| 64 | 61 | |
| 62 | + Wait Until Page Contains Element id=js-btn-0 | |
| 65 | 63 | Click Element id=js-btn-0 |
| 64 | + Wait Until Page Contains Element id=title | |
| 66 | 65 | Input text id=title ${title} |
| 67 | 66 | Input text id=descr ${description} |
| 68 | 67 | Input text id=quantity ${quantity} |
| ... | ... | @@ -74,22 +73,20 @@ Login |
| 74 | 73 | Click Element xpath=//a[contains(@data-target, 'container-dkpp')] |
| 75 | 74 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//input[@type='checkbox'][@value='4'] |
| 76 | 75 | Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//a[contains(@data-target, 'classifiers-inputs-dkpp')] |
| 77 | - Sleep 3 | |
| 78 | 76 | Input text id=dt_enquiry ${enquiry_end_date} |
| 79 | - Sleep 5 | |
| 80 | 77 | Input text id=dt_tender_start ${start_date} |
| 81 | - Sleep 5 | |
| 82 | 78 | Input text id=dt_tender_end ${end_date} |
| 83 | - Sleep 5 | |
| 84 | 79 | Input text id=step ${step_rate} |
| 85 | - Sleep 5 | |
| 86 | 80 | Click Button id=submit_button |
| 81 | + | |
| 87 | 82 | Wait Until Page Contains Element xpath=//td[@id="qa_state_purchase_id"]/p |
| 88 | - ${id}= Get Text xpath=//td[@id="qa_state_purchase_id"]/p | |
| 89 | 83 | |
| 90 | - log ${id} | |
| 91 | - Should Not Be Equal As Strings ${id} ожидание... | |
| 84 | + ${id}= Wait Until Keyword Succeeds 60sec 1sec get tender id | |
| 85 | + [return] ${id} | |
| 92 | 86 | |
| 87 | +get tender id | |
| 88 | + ${id}= Get Text xpath=//td[@id="qa_state_purchase_id"]/p | |
| 89 | + Should Not Be Equal As Strings ${id} ожидание... | |
| 93 | 90 | [return] ${id} |
| 94 | 91 | |
| 95 | 92 | Пошук тендера по ідентифікатору | ... | ... |
Please
register
or
login
to post a comment