Commit 2a87709a09ed24676cb18fbbb08b49002ab7fe7d

Authored by biviktorqc
1 parent d8246e54

Adding comments to code

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