Commit f7b7651a36cae57c75ba8869ee4e299249d4578b

Authored by Playtenders
2 parents ef1a59a8 a684a9cc

Merge branch 'v3-dev' of https://git.4k.com.ua/root/playtender-robot_tests into v3-dev

... ... @@ -289,7 +289,9 @@ open popup by btn locator
289 289 [Documentation] натискає кнопку відкриття попапу і чекає поки він відмалюється
290 290
291 291 click visible element ${btn_locator}
292   - wait until popup is visible ${popup_locator}
  292 + ${result} = run keyword and return status wait until popup is visible ${popup_locator}
  293 + run keyword if ${result} == ${False} js click element ${btn_locator}
  294 + run keyword if ${result} == ${False} wait until popup is visible ${popup_locator}
293 295
294 296 submit current visible popup
295 297 [Documentation] натискає кнопку сабміту в поточному попапі і чекає поки він закриється
... ... @@ -335,6 +337,9 @@ wait until alert is visible
335 337 run keyword if ${message_is_none} == ${True} wait until page contains element ${alert_opened_locator} 60s Alert was not shown
336 338 run keyword if ${message_is_none} == ${False} wait until page contains element ${alert_message_locator} 60s Alert was not shown
337 339
  340 + # wait for ending animation
  341 + sleep 500ms
  342 +
338 343 close current visible alert
339 344 [Documentation] закриває поточний alert
340 345
... ...
... ... @@ -39,13 +39,9 @@ answer question
39 39 wait until page contains element with reloading ${question_open_form_answer_locator}
40 40 ${question_form_open_form_answer_btn_locator} = replace string ${question_form_open_form_answer_btn_locator_tpl} %title% ${question_id}
41 41 wait until page contains element with reloading ${question_form_open_form_answer_btn_locator}
42   - ${question_open_form_answer_js_btn_locator} = replace string ${question_open_form_answer_js_btn_locator_tpl} %title% ${question_id}
43   -# open popup by btn locator ${question_form_open_form_answer_btn_locator}
44   -# sleep 300
45   -# Execute Javascript ${question_open_form_answer_js_btn_locator}
46   - execute javascript ${question_open_form_answer_js_btn_locator}
47   - input text to exist visible input ${question_form_open_form_answer_input_locator} ${answer_data.data.answer}
48   - submit form and check result ${question_form_answer_submit_btn_locator} ${question_form_submit_answer_success_msg} ${tender_created_checker_element_locator}
  42 + open popup by btn locator ${question_form_open_form_answer_btn_locator}
  43 + input text to exist visible input ${question_answer_form_answer_input_locator} ${answer_data.data.answer}
  44 + submit form and check result ${question_answer_form_submit_btn_locator} ${question_form_submit_answer_success_msg}
49 45
50 46 get question information
51 47 [Arguments] ${question_id} ${field_name}
... ...
... ... @@ -20,6 +20,9 @@ ${question_form_create_questionform_related_lot_input_locator} = jquery=.fanc
20 20 ${question_form_create_questionform_related_lot_input_locator_tpl} = jquery=.fancybox-is-open .fancybox-content #questionform-related_lot option:contains("%type_id%")
21 21 ${question_form_open_create_btn_locator} = jquery=#tender-part-pjax a[href*="/tender/question-create"]:first
22 22
  23 +${question_answer_form_answer_input_locator} = jquery=#questionanswerform-answer
  24 +${question_answer_form_submit_btn_locator} = jquery=#tender-question-answer-form .js-submit-btn
  25 +
23 26 #for viewer
24 27 ${question_answer_value_locator_tpl} = jquery=#tender-question-list .js-item div[data-title*="%title%"] .info-row.answer span.value
25 28 ${question_title_value_locator_tpl} = jquery=#tender-question-list .js-item div[data-title*="%title%"] h4.callout__title
... ...
... ... @@ -70,6 +70,15 @@ def get_is_element_exist(locator):
70 70 return True
71 71
72 72
  73 +# click
  74 +def js_click_element(locator):
  75 + element = get_library()._element_find(locator, None, True)
  76 + get_webdriver_instance().execute_script(
  77 + 'var $el = jQuery(arguments[0]); if($el.length) $el.click();',
  78 + element
  79 + )
  80 +
  81 +
73 82 # convert locator to jquery locator
74 83 def convert_locator_to_jquery(locator):
75 84 locator_params = locator.split('=', 1)
... ...
... ... @@ -15,7 +15,7 @@ open new tender form
15 15 open page and wait element by locator ${broker_baseurl}/tender/create ${tender_form_locator}
16 16
17 17 update tender queue
18   - [Documentation] запускає оновлення планів з ЦБД і додає їх в чергу, тобто синхронізація може відбутися не відразу
  18 + [Documentation] запускає оновлення тендерів з ЦБД і додає їх в чергу, тобто синхронізація може відбутися не відразу
19 19 ... поточна сторіка повертається
20 20
21 21 ${current_url} = get location
... ...
Please register or login to post a comment