Advertisement
yboi

Untitled

Jul 27th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.41 KB | None | 0 0
  1. *** Setting ***
  2. Library Selenium2Screenshots
  3. Library String
  4. Library DateTime
  5.  
  6. *** Variables ***
  7. ${locator.tenderId} jquery=h3
  8. ${locator.title} jquery=tender-subject-info>div.row:contains("Назва закупівлі:")>:eq(1)>
  9. ${locator.description} jquery=tender-subject-info>div.row:contains("Детальний опис закупівлі:")>:eq(1)>
  10. ${locator.minimalStep.amount} jquery=tender-subject-info>div.row:contains("Мінімальний крок аукціону, грн.:")>:eq(1)>
  11. ${locator.procuringEntity.name} jquery=customer-info>div.row:contains("Найменування:")>:eq(1)>
  12. ${locator.value.amount} jquery=tender-subject-info>div.row:contains("Повний доступний бюджет закупівлі, грн.:")>:eq(1)>
  13. ${locator.tenderPeriod.startDate} jquery=tender-procedure-info>div.row:contains("Початок прийому пропозицій:")>:eq(1)>
  14. ${locator.tenderPeriod.endDate} 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)>
  17.  
  18. *** Keywords ***
  19. Підготувати дані для оголошення тендера
  20. ${INITIAL_TENDER_DATA}= prepare_test_tender_data
  21. [return] ${INITIAL_TENDER_DATA}
  22.  
  23. Підготувати клієнт для користувача
  24. [Arguments] @{ARGUMENTS}
  25. [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
  26. ... ${ARGUMENTS[0]} == username
  27. Open Browser ${USERS.users['${ARGUMENTS[0]}'].homepage} alias=${ARGUMENTS[0]}
  28. Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
  29. Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position}
  30.  
  31. # login
  32. Wait Until Page Contains Element id=inputUsername 100
  33. Input text id=inputUsername ${USERS.users['${username}'].login}
  34. Input text id=inputPassword ${USERS.users['${username}'].password}
  35. Click Button id=btn_submit
  36.  
  37. Створити тендер
  38. [Arguments] @{ARGUMENTS}
  39. [Documentation]
  40. ... ${ARGUMENTS[0]} == username
  41. ... ${ARGUMENTS[1]} == tender_data
  42.  
  43. ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
  44. ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
  45. ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
  46. ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount
  47. ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount
  48. ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description
  49. ${quantity}= Get From Dictionary ${items[0]} quantity
  50. ${cpv}= Get From Dictionary ${items[0].classification} id
  51. ${dkpp_desc}= Get From Dictionary ${items[0].additionalClassifications[0]} description
  52. ${dkpp_id}= Get From Dictionary ${items[0].additionalClassifications[0]} id
  53. ${unit}= Get From Dictionary ${items[0].unit} name
  54. ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
  55. ${start_date}= convert_date_to_etender_format ${start_date}
  56. ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
  57. ${start_time}= convert_time_to_etender_format ${start_time}
  58. ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  59. ${end_date}= convert_date_to_etender_format ${end_date}
  60. ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  61. ${end_time}= convert_time_to_etender_format ${end_time}
  62. ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  63. ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date}
  64. ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  65. ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time}
  66.  
  67. Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  68. Wait Until Page Contains Мої закупівлі 100
  69. Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі']
  70. Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')]
  71. Click Element xpath=//a[contains(@class, 'btn btn-info')]
  72. Wait Until Page Contains Element id=title
  73. Input text id=title ${title}
  74. Input text id=description ${description}
  75. Input text id=value ${budget}
  76. Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox']
  77. Input text id=minimalStep ${step_rate}
  78. Input text id=itemsDescription ${items_description}
  79. Input text id=itemsQuantity ${quantity}
  80. Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram']
  81. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date}
  82. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.enquiryPeriod.endDate'] ${enquiry_end_time}
  83.  
  84. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='startDate'] ${start_date}
  85. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.startDate'] ${start_time}
  86. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date}
  87. 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}
  88.  
  89. Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification']
  90. Wait Until Page Contains Оберіть класифікатор CPV 100
  91. Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv}
  92. Wait Until Page Contains Картонки 100
  93. Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[1]//td[1]
  94. Wait Until Page Contains 44617100-9 Картонки 100
  95. Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()']
  96.  
  97. Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification']
  98. Wait Until Page Contains Класифікатор ДКПП 100
  99. Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc}
  100. Wait Until Page Contains ${dkpp_id} 100
  101. Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-table-rowselected ng-scope ng-table')]//tr[2]//td[1]
  102. Wait Until Page Contains 17.21.1 "Папір і картон гофровані, паперова й картонна тара" 100
  103. Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
  104. Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
  105. Wait Until Page Contains [ТЕСТУВАННЯ] 100
  106. Click Element xpath=//table[contains(@class, 'table table-hover table-striped table-bordered ng-scope ng-table')]//tr[1]//a
  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:
  109. ${tender_UAid}= Convert To String UA-2015-06-30-000012
  110. ${Ids} Create List ${tender_UAid}
  111. [return] ${Ids}
  112.  
  113. get tender UAid
  114. ${tender_UAid}= Get Text xpath=//div[contains(@class, "panel-heading")]
  115. ${tender_UAid}= Get Substring ${tender_UAid} 7 27
  116.  
  117.  
  118. Oтримати internal id по UAid
  119. [Arguments] @{ARGUMENTS}
  120. [Documentation]
  121. ... ${ARGUMENTS[0]} == username
  122. ... ${ARGUMENTS[1]} == tenderid
  123. etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
  124. ${current_location}= Get Location
  125. ${tender_id}= Fetch From Right ${current_location} /
  126. ### harcode Idis bacause issues on the E-tender side, to remove, 1 line:
  127. ${tender_id}= Convert To String 94ffe180019d459787aafe290cd300e2
  128. log ${tender_id}
  129. [return] ${tender_id}
  130.  
  131. Пошук тендера по ідентифікатору
  132. [Arguments] @{ARGUMENTS}
  133. [Documentation]
  134. ... ${ARGUMENTS[0]} == username
  135. ... ${ARGUMENTS[1]} == tenderId
  136.  
  137. Switch browser ${ARGUMENTS[0]}
  138. Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
  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
  144. Click Link jquery=a[href^="#/tenderDetailes"]
  145. Wait Until Page Contains ${ARGUMENTS[1]} 10
  146. sleep 1
  147. Capture Page Screenshot
  148.  
  149. обновити сторінку з тендером
  150. [Arguments] @{ARGUMENTS}
  151. [Documentation]
  152. ... ${ARGUMENTS[0]} == username
  153. ... ${ARGUMENTS[1]} == tenderId
  154. ... ${ARGUMENTS[2]} == id
  155. ${current_location}= Get Location
  156. Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
  157. Run keyword unless '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Пошук тендера по ідентифікатору @{ARGUMENTS}
  158. Wait Until Page Contains ${ARGUMENTS[1]} 10
  159. sleep 1
  160.  
  161. отримати інформацію із тендера
  162. [Arguments] @{ARGUMENTS}
  163. [Documentation]
  164. ... ${ARGUMENTS[0]} == username
  165. ... ${ARGUMENTS[1]} == fieldname
  166. Switch browser ${ARGUMENTS[0]}
  167. ${return_value}= run keyword отримати інформацію про ${ARGUMENTS[1]}
  168. [return] ${return_value}
  169.  
  170. Відмітити на сторінці поле з тендера
  171. [Arguments] ${fieldname} ${locator}
  172. ${last_note_id}= Add pointy note ${locator} Found ${fieldname} width=200 position=bottom
  173. Align elements horizontally ${locator} ${last_note_id}
  174. sleep 1
  175. Remove element ${last_note_id}
  176.  
  177. Отримати тест із поля і показати на сторінці
  178. [Arguments] ${fieldname}
  179. sleep 3
  180. # відмітити на сторінці поле з тендера ${fieldname} ${locator.${fieldname}}
  181. ${return_value}= Get Text ${locator.${fieldname}}
  182. [return] ${return_value}
  183.  
  184. отримати інформацію про tenderId
  185. ${return_value}= Отримати тест із поля і показати на сторінці tenderId
  186. [return] ${return_value.split(' ')[1]}
  187.  
  188. отримати інформацію про title
  189. ${return_value}= Отримати тест із поля і показати на сторінці title
  190. [return] ${return_value}
  191.  
  192. отримати інформацію про description
  193. ${return_value}= Отримати тест із поля і показати на сторінці description
  194. [return] ${return_value}
  195.  
  196. отримати інформацію про minimalStep.amount
  197. ${return_value}= Отримати тест із поля і показати на сторінці minimalStep.amount
  198. ${return_value}= Convert To Number ${return_value.split(' ')[0]}
  199. [return] ${return_value}
  200.  
  201. отримати інформацію про procuringEntity.name
  202. ${return_value}= Отримати тест із поля і показати на сторінці procuringEntity.name
  203. [return] ${return_value}
  204.  
  205.  
  206. отримати інформацію про value.amount
  207. ${return_value}= Отримати тест із поля і показати на сторінці value.amount
  208. ${return_value}= Evaluate "".join("${return_value}".split(' ')[:-3])
  209. ${return_value}= Convert To Number ${return_value}
  210. [return] ${return_value}
  211.  
  212. отримати інформацію про tenderPeriod.startDate
  213. ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.startDate
  214. [return] ${return_value}
  215.  
  216. отримати інформацію про tenderPeriod.endDate
  217. ${return_value}= Отримати тест із поля і показати на сторінці tenderPeriod.endDate
  218. [return] ${return_value}
  219.  
  220. отримати інформацію про enquiryPeriod.startDate
  221. ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.startDate
  222. [return] ${return_value}
  223.  
  224. отримати інформацію про enquiryPeriod.endDate
  225. ${return_value}= Отримати тест із поля і показати на сторінці enquiryPeriod.endDate
  226. [return] ${return_value}
  227.  
  228.  
  229. отримати інформацію про items[${item_id}].description
  230. відмітити на сторінці поле з тендера items[${item_id}].description jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)>
  231. ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Детальний опис предмету закупівлі:")>:eq(1)>
  232. [return] ${return_value}
  233.  
  234. отримати інформацію про items[${item_id}].quantity
  235. відмітити на сторінці поле з тендера items[${item_id}].quantity jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)>
  236. ${return_value}= Get Text jquery=tender-subject-info.ng-isolate-scope>div.row:contains("Кількість:")>:eq(1)>
  237. ${return_value}= Convert To Number ${return_value}
  238. [return] ${return_value}
  239.  
  240. отримати інформацію про items[${item_id}].classification.id
  241. відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)>
  242. ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)>
  243. [return] ${return_value.split(' ')[0]}
  244.  
  245. отримати інформацію про items[${item_id}].classification.scheme
  246. відмітити на сторінці поле з тендера items[0].classification.id jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)>
  247. ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("CPV")>:eq(1)>
  248. [return] ${return_value.split(' ')[0]}
  249.  
  250. отримати інформацію про items[${item_id}].classification.description
  251. відмітити на сторінці поле з тендера classification.description jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)>
  252. ${return_value}= Get Text jquery=tender-subject-info>div.row:contains("Класифікатор CPV:")>:eq(1)>
  253. ${return_value}= catenate @{return_value.split(' ')[1:]}
  254. [return] ${return_value}
  255.  
  256. отримати інформацію про items[${item_id}].deliveryAddress
  257. ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryAddress
  258. [return] ${return_value}
  259.  
  260. отримати інформацію про items[${item_id}].deliveryDate
  261. ${return_value}= Отримати тест із поля і показати на сторінці items[${item_id}].deliveryDate
  262. [return] ${return_value}
  263.  
  264. отримати інформацію про questions[${question_id}].title
  265. відмітити на сторінці поле з тендера questions title jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)>
  266. ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Тема:")>:eq(1)>
  267. [return] ${return_value}
  268.  
  269. отримати інформацію про questions[${question_id}].description
  270. відмітити на сторінці поле з тендера questions description jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)>
  271. ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Питання:")>:eq(1)>
  272. [return] ${return_value}
  273.  
  274. отримати інформацію про questions[${question_id}].date
  275. відмітити на сторінці поле з тендера question date jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)>
  276. ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div.row:contains("Дата:")>:eq(1)>
  277. [return] ${return_value}
  278.  
  279. отримати інформацію про questions[${question_id}].answer
  280. відмітити на сторінці поле з тендера question answer jquery=tender-questions>div:eq(1)>div:last>
  281. ${return_value}= Get Text jquery=tender-questions>div:eq(1)>div:last>
  282. [return] ${return_value}
  283.  
  284. Подати цінову пропозицію
  285. [Arguments] @{ARGUMENTS}
  286. [Documentation]
  287. ... ${ARGUMENTS[0]} == username
  288. ... ${ARGUMENTS[1]} == ${INTERNAL_TENDER_ID}
  289. ... ${ARGUMENTS[2]} == test_bid_data
  290.  
  291. ${bid}= Get From Dictionary ${ARGUMENTS[2].data.value} amount
  292. etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]}
  293. Wait Until Page Contains Інформація про процедуру закупівлі 100
  294. Wait Until Page Contains Element id=amount 10
  295. Input text id=amount ${bid}
  296. Click Element xpath=//button[contains(@class, 'btn btn-success')][./text()='Реєстрація пропозиції']
  297.  
  298. Задати питання
  299. [Arguments] @{ARGUMENTS}
  300. [Documentation]
  301. ... ${ARGUMENTS[0]} = username
  302. ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
  303. ... ${ARGUMENTS[2]} = question_data
  304.  
  305. ${title}= Get From Dictionary ${ARGUMENTS[2].data} title
  306. ${description}= Get From Dictionary ${ARGUMENTS[2].data} description
  307.  
  308. Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  309. etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  310.  
  311. Wait Until Page Contains Element jquery=a[href^="#/addQuestion/"] 100
  312. Click Element jquery=a[href^="#/addQuestion/"]
  313. Wait Until Page Contains Element id=title
  314. Input text id=title ${title}
  315. Input text id=description ${description}
  316. Click Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
  317.  
  318. Відповісти на питання
  319. [Arguments] @{ARGUMENTS}
  320. [Documentation]
  321. ... ${ARGUMENTS[0]} = username
  322. ... ${ARGUMENTS[1]} = ${INTERNAL_TENDER_ID}
  323. ... ${ARGUMENTS[2]} = 0
  324. ... ${ARGUMENTS[3]} = answer_data
  325.  
  326. ${answer}= Get From Dictionary ${ARGUMENTS[3].data} answer
  327.  
  328. Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  329. etender.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} ${TENDER_ID}
  330.  
  331. Click Element xpath=//div[div/pre[1]]/div[1]
  332. Input text xpath=//div[textarea]/textarea ${answer}
  333. Click Element xpath=//div[textarea]/span/button[1]
  334.  
  335. Багатопредметний тендер
  336. [Arguments] @{ARGUMENTS}
  337. [Documentation]
  338. ... ${ARGUMENTS[0]} == username
  339. ... ${ARGUMENTS[1]} == tender_data
  340.  
  341. ${items}= Get From Dictionary ${ARGUMENTS[1].data} items
  342. ${title}= Get From Dictionary ${ARGUMENTS[1].data} title
  343. ${description}= Get From Dictionary ${ARGUMENTS[1].data} description
  344. ${budget}= Get From Dictionary ${ARGUMENTS[1].data.value} amount
  345. ${step_rate}= Get From Dictionary ${ARGUMENTS[1].data.minimalStep} amount
  346. ${items_description}= Get From Dictionary ${ARGUMENTS[1].data} description
  347. ${quantity}= Get From Dictionary ${items[0]} quantity
  348. ${cpv}= Get From Dictionary ${items[0].classification} id
  349. ${dkpp_desc0}= Get From Dictionary ${items[0].additionalClassifications[0]} description
  350. ${dkpp_id0}= Get From Dictionary ${items[0].additionalClassifications[0]} id
  351. ${dkpp_desc1}= Get From Dictionary ${items[1].additionalClassifications[0]} description
  352. ${dkpp_id1}= Get From Dictionary ${items[1].additionalClassifications[0]} id
  353. ${dkpp_desc2}= Get From Dictionary ${items[2].additionalClassifications[0]} description
  354. ${dkpp_id2}= Get From Dictionary ${items[2].additionalClassifications[0]} id
  355. ${dkpp_desc3}= Get From Dictionary ${items[3].additionalClassifications[0]} description
  356. ${dkpp_id3}= Get From Dictionary ${items[3].additionalClassifications[0]} id
  357. ${unit}= Get From Dictionary ${items[0].unit} name
  358. ${start_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
  359. ${start_date}= convert_date_to_etender_format ${start_date}
  360. ${start_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} startDate
  361. ${start_time}= convert_time_to_etender_format ${start_time}
  362. ${end_date}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  363. ${end_date}= convert_date_to_etender_format ${end_date}
  364. ${end_time}= Get From Dictionary ${ARGUMENTS[1].data.tenderPeriod} endDate
  365. ${end_time}= convert_time_to_etender_format ${end_time}
  366. ${enquiry_end_date}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  367. ${enquiry_end_date}= convert_date_to_etender_format ${enquiry_end_date}
  368. ${enquiry_end_time}= Get From Dictionary ${ARGUMENTS[1].data.enquiryPeriod} endDate
  369. ${enquiry_end_time}= convert_time_to_etender_format ${enquiry_end_time}
  370.  
  371. Selenium2Library.Switch Browser ${ARGUMENTS[0]}
  372. Maximize Browser Window
  373. Wait Until Page Contains Мої закупівлі 100
  374. Click Element xpath=//a[contains(@class, 'ng-binding')][./text()='Мої закупівлі']
  375. Wait Until Page Contains Element xpath=//a[contains(@class, 'btn btn-info')] 100
  376. Click Element xpath=//a[contains(@class, 'btn btn-info')]
  377. Wait Until Page Contains Element id=title
  378. Input text id=title ${title}
  379. Input text id=description ${description}
  380. Input text id=value ${budget}
  381. Click Element xpath=//div[contains(@class, 'form-group col-sm-6')]//input[@type='checkbox']
  382. Input text id=minimalStep ${step_rate}
  383. Input text id=itemsDescription ${items_description}
  384. DEBUG
  385. Input text id=itemsQuantity ${quantity}
  386. Click Element xpath=//select[@name="itemsUnit"]/option[@value='kilogram']
  387. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='enqPEndDate'] ${enquiry_end_date}
  388. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.enquiryPeriod.endDate'] ${enquiry_end_time}
  389.  
  390. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='startDate'] ${start_date}
  391. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//div[contains(@class, 'col-sm-2')]//input[@ng-model='data.tenderPeriod.startDate'] ${start_time}
  392. Input text xpath=//div[contains(@class, 'form-group col-sm-8')]//input[@name='endDate'] ${end_date}
  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}
  394.  
  395. Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#classification']
  396. Wait Until Page Contains Element xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] 100
  397. Input text xpath=//div[contains(@class, 'modal-content')]//input[@ng-model='searchstring'] ${cpv}
  398. Wait Until Page Contains Картонки 100
  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]
  400. Wait Until Page Contains 44617100-9 Картонки 100
  401. Click Element xpath=//div[contains(@class, 'modal-content')]//button[@ng-click='choose()']
  402.  
  403. Wait Until Page Contains Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'] 100
  404. Click Element xpath=//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification']
  405. Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
  406. Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc0}
  407. Wait Until Page Contains ${dkpp_id0} 100
  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]
  409. Wait Until Page Contains 17.29.12-00.00 "Блоки, плити та пластини фільтрувальні, з паперової маси" 100
  410. Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
  411.  
  412. Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
  413. Click Element xpath=.//*[@id='myform']/tender-form/div/button
  414. Sleep 2
  415. Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[2]
  416. Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
  417. Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc1}
  418. Wait Until Page Contains ${dkpp_id1} 100
  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]
  420. Wait Until Page Contains 17.21.99-00.00 "Роботи субпідрядні як частина виробництва гофрованих паперу й картону, паперової та картонної тари" 100
  421. Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
  422.  
  423. Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
  424. Click Element xpath=.//*[@id='myform']/tender-form/div/button
  425. Sleep 2
  426. Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[3]
  427. Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
  428. Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc2}
  429. Wait Until Page Contains ${dkpp_id2} 100
  430. Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2]
  431. Wait Until Page Contains 17.22.12-40.00 "Вата; вироби з вати, інші" 100
  432. Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
  433.  
  434. Sleep 2
  435. Wait Until Page Contains Element xpath=.//*[@id='myform']/tender-form/div/button 100
  436. Click Element xpath=.//*[@id='myform']/tender-form/div/button
  437. Wait Until Page Contains Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4] 100
  438. Click Element xpath=(//div[contains(@class, 'col-sm-2')]//input[@data-target='#addClassification'])[4]
  439. Wait Until Page Contains Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] 100
  440. Input text xpath=//div[contains(@class, 'modal fade ng-scope in')]//input[@ng-model='searchstring'] ${dkpp_desc3}
  441. Wait Until Page Contains ${dkpp_id3} 100
  442. Click Element xpath=.//*[@id='addClassification']/div/div/div[2]/table/tbody/tr/td[2]
  443. Wait Until Page Contains 17.22.12-50.00 "Одяг і речі до одягу з паперової маси, паперу, целюлозної вати чи полотна з целюлозного волокна (крім носових хусточок, наголовних уборів)" 100
  444. Click Element xpath=//div[contains(@class, 'modal fade ng-scope in')]//button[@ng-click='choose()']
  445.  
  446. Wait Until Page Contains Element xpath=//div[contains(@class, 'form-actions')]//button[@type='submit']
  447. Capture Page Screenshot
  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}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement