Commit 2a87709a09ed24676cb18fbbb08b49002ab7fe7d

Authored by biviktorqc
1 parent d8246e54

Adding comments to code

... ... @@ -33,7 +33,7 @@ ${locator.tenderId} jquery=h3
33 33 [Documentation]
34 34 ... ${ARGUMENTS[0]} == username
35 35 ... ${ARGUMENTS[1]} == tender_data
36   -
  36 +## Inicialisation
37 37 ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
38 38 ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
39 39 ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
... ... @@ -58,14 +58,13 @@ ${locator.tenderId} jquery=h3
58 58 ${region}= Get From Dictionary ${items[0].deliveryAddress} region
59 59 ${locality}= Get From Dictionary ${items[0].deliveryAddress} locality
60 60 ${streetAddress}= Get From Dictionary ${items[0].deliveryAddress} streetAddress
61   -
62   -
  61 +##
63 62 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
64 63 Go To ${USERS.users['${username}'].homepage}
65 64 Wait Until Page Contains Element xpath=//a[@href="#/create-tender"] 100
66 65 Click Link xpath=//a[@href="#/create-tender"]
67 66 Wait Until Page Contains Новый тендер 100
68   -
  67 +# Input fields
69 68 Input text name=tenderName ${title}
70 69 Input text name=tenderDescription ${description}
71 70 Input text id=budget ${budget}
... ... @@ -75,18 +74,21 @@ ${locator.tenderId} jquery=h3
75 74 Input text id=quantity0 ${quantity}
76 75 Click Element xpath=//a[@class="dropdown-toggle ng-binding"]
77 76 Click Element xpath=//a[contains(text(),'${unit}')]
  77 +# Set CPV
78 78 Click Element id=classifier10
79 79 Wait Until Page Contains Element xpath=//input[@class="ng-pristine ng-untouched ng-valid"] 100
80 80 Input text xpath=//input[@class="ng-pristine ng-untouched ng-valid"] ${cpv}
81 81 Wait Until Page Contains Element xpath=//span[contains(text(),'${cpv}')] 20
82 82 Click Element xpath=//input[@class="ng-pristine ng-untouched ng-valid"]
83 83 Click Element xpath=//button[@class="btn btn-default btn-lg pull-right choose ng-binding"]
  84 +# Set ДКПП
84 85 Click Element id=classifier20
85 86 Wait Until Page Contains Element xpath=//input[@class="ng-pristine ng-untouched ng-valid"] 100
86 87 Input text xpath=//input[@class="ng-pristine ng-untouched ng-valid"] ${dkpp_desc}
87 88 Wait Until Page Contains Element xpath=//span[contains(text(),'${dkpp_id}')] 100
88 89 Click Element xpath=//span[contains(text(),'${dkpp_id}')]/../..//input[@class="ng-pristine ng-untouched ng-valid"]
89 90 Click Element xpath=//button[@class="btn btn-default btn-lg pull-right choose ng-binding"]
  91 +# Set Delivery Address
90 92 Click Element id=deliveryAddress0
91 93 Wait Until Page Contains Element xpath=//input[1][@class="form-control ng-pristine ng-untouched ng-valid"] 100
92 94 Input text xpath=//input[1][@class="form-control ng-pristine ng-untouched ng-valid"] ${countryName}
... ... @@ -95,19 +97,19 @@ ${locator.tenderId} jquery=h3
95 97 Input text xpath=//input[1][@class="form-control ng-pristine ng-untouched ng-valid"] ${locality}
96 98 Input text xpath=//input[1][@class="form-control ng-pristine ng-untouched ng-valid"] ${streetAddress}
97 99 Click Element xpath=//button[@class="btn btn-lg single-btn ng-binding"]
  100 +# Set Datetimes
98 101 Set datetime end-date-delivery0 ${deliverydate_end_date}
99 102 Set datetime start-date-registration ${start_date}
100 103 Set datetime end-date-registration ${end_date}
101 104 Set datetime end-date-qualification ${enquiry_end_date}
102 105 Set datetime start-date-qualification ${enquiry_start_date}
  106 +
103 107 Click Element xpath=//button[@class="btn btn-lg btn-default cancel pull-right ng-binding"]
104 108 Wait Until Page Contains Element xpath=//div[@ng-click="goHome()"] 30
105 109 Click Element xpath=//div[@ng-click="goHome()"]
106   -
107   -# ${tender_UAid}= Get Text xpath=//div[@class="title"]
108   -### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
  110 +### harcode Idis bacause issues on the Newtend side, to remove after fix:
109 111 ${tender_UAid}= Convert To String UA-2015-07-06-000105
110   -
  112 +### ${tender_UAid}= Get Text xpath=//div[@class="title"]
111 113 ${Ids} Create List ${tender_UAid}
112 114 [return] ${Ids}
113 115
... ... @@ -116,6 +118,7 @@ Set datetime
116 118 [Documentation]
117 119 ... ${ARGUMENTS[0]} == control_id
118 120 ... ${ARGUMENTS[1]} == date
  121 +#Pick Date
119 122 Click Element xpath=//input[@id="${ARGUMENTS[0]}"]/../span[@class="calendar-btn"]
120 123 Wait Until Page Contains Element xpath=//td[@class="text-center ng-scope"] 30
121 124 ${datapicker_id}= Get Element Attribute xpath=//input[@id="${ARGUMENTS[0]}"]/..//td[@class="text-center ng-scope"]@id
... ... @@ -123,17 +126,12 @@ Set datetime
123 126 ${date_index}= newtend_date_picker_index ${ARGUMENTS[1]}
124 127 ${datapicker_id}= Convert To String ${datapicker_id}${date_index}
125 128 Click Element xpath=//input[@id="${ARGUMENTS[0]}"]/..//td[@id="${datapicker_id}"]/button
126   -
  129 +#Set time
127 130 ${hous}= Get Substring ${ARGUMENTS[1]} 11 13
128 131 ${minutes}= Get Substring ${ARGUMENTS[1]} 14 16
129 132 Input text xpath=//input[@id="${ARGUMENTS[0]}"]/../..//input[@ng-model="hours"] ${hous}
130 133 Input text xpath=//input[@id="${ARGUMENTS[0]}"]/../..//input[@ng-model="minutes"] ${minutes}
131 134
132   -get tender UAid
133   - ${tender_UAid}= Get Text xpath=//div[@class="title"]
134   -# ${tender_UAid}= Get Substring ${tender_UAid} 7 27
135   - [return] ${tender_UAid}
136   -
137 135
138 136
139 137 #### Not reworked for Newtend ####
... ...
Please register or login to post a comment