Commit 98fd711270c2eb8440861066992b3a22bfc2d5c3

Authored by selurvedu
1 parent 9d2f1055

Adapt brokers' keyword files

... ... @@ -201,7 +201,8 @@ Set Multi Ids
201 201 ... ${ARGUMENTS[0]} == username
202 202 ... ${ARGUMENTS[1]} == ${TENDER_UAID}
203 203 Switch browser ${ARGUMENTS[0]}
204   - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
  204 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  205 + Go To ${url}
205 206 Wait Until Page Contains Прозорі закупівлі 10
206 207 sleep 1
207 208 Input Text jquery=input[ng-change='searchChange()'] ${ARGUMENTS[1]}
... ... @@ -311,7 +312,8 @@ Set Multi Ids
311 312 [Documentation]
312 313 ... ${ARGUMENTS[0]} = username
313 314 ... ${ARGUMENTS[1]} = ${TENDER_UAID}
314   - ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} single
  315 + ${period_interval}= Get Broker Property By Username ${ARGUMENTS[0]} period_interval
  316 + ${ADDITIONAL_DATA}= prepare_test_tender_data ${period_interval} single
315 317 ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA}
316 318 ${items}= Get From Dictionary ${tender_data.data} items
317 319 ${description}= Get From Dictionary ${tender_data.data} description
... ... @@ -330,7 +332,8 @@ Set Multi Ids
330 332 ... ${ARGUMENTS[0]} = username
331 333 ... ${ARGUMENTS[1]} = ${TENDER_UAID}
332 334 ... ${ARGUMENTS[2]} = 3
333   - ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi
  335 + ${period_interval}= Get Broker Property By Username ${ARGUMENTS[0]} period_interval
  336 + ${ADDITIONAL_DATA}= prepare_test_tender_data ${period_interval} multi
334 337 ${tender_data}= Add_data_for_GUI_FrontEnds ${ADDITIONAL_DATA}
335 338 ${items}= Get From Dictionary ${tender_data.data} items
336 339 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
... ...
... ... @@ -31,7 +31,8 @@ ${locator.questions[0].answer} xpath=//div[@class = 'answer relative']//di
31 31 [Arguments] @{ARGUMENTS}
32 32 [Documentation] Відкрити брaузер, створити обєкт api wrapper, тощо
33 33 ... ${ARGUMENTS[0]} == username
34   - Open Browser ${BROKERS['${USERS.users['${ARGUMENTS[0]}'].broker}'].url} ${USERS.users['${ARGUMENTS[0]}'].browser} alias=${ARGUMENTS[0]}
  34 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  35 + Open Browser ${url} ${USERS.users['${ARGUMENTS[0]}'].browser} alias=${ARGUMENTS[0]}
35 36 Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
36 37 Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position}
37 38 Run Keyword And Ignore Error Pre Login ${ARGUMENTS[0]}
... ... @@ -53,10 +54,12 @@ Pre Login
53 54 [Arguments] @{ARGUMENTS}
54 55 [Documentation]
55 56 ... ${ARGUMENTS[0]} == username
56   - Wait Until Page Contains Element name=siteLogin 10
57   - Input text name=siteLogin ${BROKERS['${USERS.users['${username}'].broker}'].login}
58   - Input text name=sitePass ${BROKERS['${USERS.users['${username}'].broker}'].password}
59   - Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input
  57 + ${login}= Get Broker Property By Username ${ARGUMENTS[0]} login
  58 + ${password}= Get Broker Property By Username ${ARGUMENTS[0]} password
  59 + Wait Until Page Contains Element name=siteLogin 10
  60 + Input Text name=siteLogin ${login}
  61 + Input Text name=sitePass ${password}
  62 + Click Button xpath=.//*[@id='table1']/tbody/tr/td/form/p[3]/input
60 63
61 64 Створити тендер
62 65 [Arguments] @{ARGUMENTS}
... ... @@ -187,7 +190,8 @@ Set Multi Ids
187 190 ... ${ARGUMENTS[0]} = username
188 191 ... ${ARGUMENTS[1]} = ${TENDER_UAID}
189 192 ... ${ARGUMENTS[2]} = 3
190   - ${tender_data}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi
  193 + ${period_interval}= Get Broker Property By Username ${ARGUMENTS[0]} period_interval
  194 + ${tender_data}= prepare_test_tender_data ${period_interval} multi
191 195
192 196 ${items}= Get From Dictionary ${tender_data.data} items
193 197 ${description}= Get From Dictionary ${tender_data.data} description
... ... @@ -229,7 +233,8 @@ Set Multi Ids
229 233 ... ${ARGUMENTS[0]} == username
230 234 ... ${ARGUMENTS[1]} == tenderId
231 235 Switch browser ${ARGUMENTS[0]}
232   - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
  236 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  237 + Go To ${url}
233 238 Wait Until Page Contains Держзакупівлі.онлайн 10
234 239 Click Element xpath=//a[text()='Закупівлі']
235 240 sleep 1
... ...
... ... @@ -42,7 +42,8 @@ ${locator.QUESTIONS[0].date} xpath=//span[@class="date ng-binding"]
42 42 [Arguments] @{ARGUMENTS}
43 43 [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
44 44 ... ${ARGUMENTS[0]} == username
45   - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]}
  45 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  46 + Open Browser ${url} ${USERS.users['${username}'].browser} alias=${ARGUMENTS[0]}
46 47 Set Window Size @{USERS.users['${ARGUMENTS[0]}'].size}
47 48 Set Window Position @{USERS.users['${ARGUMENTS[0]}'].position}
48 49 Run Keyword If '${username}' != 'Newtend_Viewer' Login
... ... @@ -400,7 +401,8 @@ Set datetime
400 401 ... ${ARGUMENTS[0]} = username
401 402 ... ${ARGUMENTS[1]} = ${TENDER_UAID}
402 403 ... ${ARGUMENTS[2]} = 3
403   - ${ADDITIONAL_DATA}= prepare_test_tender_data ${BROKERS['${USERS.users['${tender_owner}'].broker}'].period_interval} multi
  404 + ${period_interval}= Get Broker Property By Username ${ARGUMENTS[0]} period_interval
  405 + ${ADDITIONAL_DATA}= prepare_test_tender_data ${period_interval} multi
404 406 ${items}= Get From Dictionary ${ADDITIONAL_DATA.data} items
405 407 Selenium2Library.Switch Browser ${ARGUMENTS[0]}
406 408 Wait Until Page Contains Element ${locator.edit_tender} 10
... ...
... ... @@ -21,7 +21,8 @@ ${PASSWORD} 1234
21 21 log many @{ARGUMENTS}
22 22 log ${username}
23 23 [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
24   - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username}
  24 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  25 + Open Browser ${url} ${USERS.users['${username}'].browser} alias=${username}
25 26 Set Window Position @{USERS.users['${username}'].position}
26 27 #Set Window Size @{USERS.users['${username}'].size}
27 28 Log Variables
... ... @@ -99,8 +100,9 @@ Get tender id
99 100 ... ${ARGUMENTS[2]} == id
100 101 Switch browser ${ARGUMENTS[0]}
101 102 ${current_location}= Get Location
102   - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
103   - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
  103 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  104 + Run Keyword If '${url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
  105 + Go to ${url}
104 106 Wait Until Page Contains Допороговые закупки Украины 10
105 107 sleep 1
106 108 Input Text id=search ${ARGUMENTS[1]}
... ...
... ... @@ -7,7 +7,8 @@ Library DateTime
7 7 Підготувати клієнт для користувача
8 8 [Arguments] ${username}
9 9 [Documentation] Відкрити брaвзер, створити обєкт api wrapper, тощо
10   - Open Browser ${BROKERS['${USERS.users['${username}'].broker}'].url} ${USERS.users['${username}'].browser} alias=${username}
  10 + ${url}= Get Broker Property By Username ${username} url
  11 + Open Browser ${url} ${USERS.users['${username}'].browser} alias=${username}
11 12 Set Window Position @{USERS.users['${username}'].position}
12 13 Set Window Size @{USERS.users['${username}'].size}
13 14 Log Variables
... ... @@ -20,8 +21,9 @@ Library DateTime
20 21 ... ${ARGUMENTS[2]} == id
21 22 Switch browser ${ARGUMENTS[0]}
22 23 ${current_location}= Get Location
23   - Run keyword if '${BROKERS['${USERS.users['${username}'].broker}'].url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
24   - Go to ${BROKERS['${USERS.users['${username}'].broker}'].url}
  24 + ${url}= Get Broker Property By Username ${ARGUMENTS[0]} url
  25 + Run Keyword If '${url}/#/tenderDetailes/${ARGUMENTS[2]}'=='${current_location}' Reload Page
  26 + Go To ${url}
25 27 Wait Until Page Contains Офіційний майданчик державних закупівель України 10
26 28 sleep 1
27 29 Input Text id=j_idt18:datalist:j_idt67 ${ARGUMENTS[1]}
... ...
Please register or login to post a comment