Commit 06409ab071d9d3f2a3b86c0b91908ce7ea8bbe4c
1 parent
eb2ae798
puuled in new prom tests not completley working
Showing
1 changed file
with
81 additions
and
1 deletions
| ... | ... | @@ -2,16 +2,96 @@ |
| 2 | 2 | Library Selenium2Screenshots |
| 3 | 3 | Library String |
| 4 | 4 | Library DateTime |
| 5 | +Library Selenium2Library | |
| 6 | +Library ApiCommands | |
| 7 | +Library Collections | |
| 8 | + | |
| 9 | + | |
| 10 | +*** Variables *** | |
| 11 | +${HOMEPAGE} http://my.dz-test.net/cabinet/sign-in?sp=1&next=%2Fcabinet%2Fpurchases%2Fstate_purchase | |
| 12 | +${BROWSER} chrome | |
| 13 | +${LOGIN} r.zaporozhets@smartweb.com.ua | |
| 14 | +${PASSWORD} 1234 | |
| 5 | 15 | |
| 6 | 16 | *** Keywords *** |
| 7 | 17 | Підготувати клієнт для користувача |
| 8 | 18 | [Arguments] ${username} |
| 19 | + log many @{ARGUMENTS} | |
| 20 | + log ${username} | |
| 9 | 21 | [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо |
| 10 | 22 | Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username} |
| 11 | 23 | Set Window Position @{USERS.users['${username}'].position} |
| 12 | - Set Window Size @{USERS.users['${username}'].size} | |
| 24 | + #Set Window Size @{USERS.users['${username}'].size} | |
| 13 | 25 | Log Variables |
| 14 | 26 | |
| 27 | +Go to homepage | |
| 28 | + Switch Browser Prom Owner | |
| 29 | + Go To ${HOMEPAGE} | |
| 30 | + | |
| 31 | +Login | |
| 32 | + Input text id=phone_email ${LOGIN} | |
| 33 | + Input text id=password ${PASSWORD} | |
| 34 | + Click Button id=submit_login_button | |
| 35 | + | |
| 36 | +#TODO: tender data should pass as args make converter from client initial data to prom initial data | |
| 37 | + | |
| 38 | +Створити тендер | |
| 39 | + [Arguments] @{ARGUMENTS} | |
| 40 | + log many @{ARGUMENTS} | |
| 41 | + | |
| 42 | + Go to homepage | |
| 43 | + Sleep 10 | |
| 44 | + Wait Until Page Contains Element id=phone_email | |
| 45 | + | |
| 46 | + Login | |
| 47 | + Sleep 3 | |
| 48 | + | |
| 49 | + ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate | |
| 50 | + ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate | |
| 51 | + | |
| 52 | + ${enquiry_start_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} startDate | |
| 53 | + ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate | |
| 54 | + | |
| 55 | + ${items}= Get From Dictionary ${ARGUMENTS[1].data} items | |
| 56 | + ${delivery_date}= Get From Dictionary ${items[0].deliveryDate} endDate | |
| 57 | + | |
| 58 | + ${title}= Get From Dictionary ${ARGUMENTS[1].data} title | |
| 59 | + ${description}= Get From Dictionary ${ARGUMENTS[1].data} description | |
| 60 | + | |
| 61 | + ${quantity}= Get From Dictionary ${items[0]} quantity | |
| 62 | + ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount | |
| 63 | + ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount | |
| 64 | + | |
| 65 | + Click Element id=js-btn-0 | |
| 66 | + Input text id=title ${title} | |
| 67 | + Input text id=descr ${description} | |
| 68 | + Input text id=quantity ${quantity} | |
| 69 | + Input text id=amount ${budget} | |
| 70 | + Click Element xpath=//a[contains(@data-target, 'container-cpv')] | |
| 71 | + Click Element xpath=//div[contains(@class, 'qa_container_cpv_popup')]//input[@type='checkbox'][@value='16662'] | |
| 72 | + Click Element xpath=//div[contains(@class, 'qa_container_cpv_popup')]//a[contains(@data-target, 'classifiers-inputs-cpv')] | |
| 73 | + | |
| 74 | + Click Element xpath=//a[contains(@data-target, 'container-dkpp')] | |
| 75 | + Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//input[@type='checkbox'][@value='4'] | |
| 76 | + Click Element xpath=//div[contains(@class, 'qa_container_dkpp_popup')]//a[contains(@data-target, 'classifiers-inputs-dkpp')] | |
| 77 | + Sleep 3 | |
| 78 | + Input text id=dt_enquiry ${enquiry_end_date} | |
| 79 | + Sleep 5 | |
| 80 | + Input text id=dt_tender_start ${start_date} | |
| 81 | + Sleep 5 | |
| 82 | + Input text id=dt_tender_end ${end_date} | |
| 83 | + Sleep 5 | |
| 84 | + Input text id=step ${step_rate} | |
| 85 | + Sleep 5 | |
| 86 | + Click Button id=submit_button | |
| 87 | + 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 | + | |
| 90 | + log ${id} | |
| 91 | + Should Not Be Equal As Strings ${id} ожидание... | |
| 92 | + | |
| 93 | + [return] ${id} | |
| 94 | + | |
| 15 | 95 | Пошук тендера по ідентифікатору |
| 16 | 96 | [Arguments] @{ARGUMENTS} |
| 17 | 97 | [Documentation] | ... | ... |
Please
register
or
login
to post a comment