Showing
5 changed files
with
19 additions
and
9 deletions
@@ -289,7 +289,9 @@ open popup by btn locator | @@ -289,7 +289,9 @@ open popup by btn locator | ||
289 | [Documentation] натискає кнопку відкриття попапу і чекає поки він відмалюється | 289 | [Documentation] натискає кнопку відкриття попапу і чекає поки він відмалюється |
290 | 290 | ||
291 | click visible element ${btn_locator} | 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 | submit current visible popup | 296 | submit current visible popup |
295 | [Documentation] натискає кнопку сабміту в поточному попапі і чекає поки він закриється | 297 | [Documentation] натискає кнопку сабміту в поточному попапі і чекає поки він закриється |
@@ -39,13 +39,9 @@ answer question | @@ -39,13 +39,9 @@ answer question | ||
39 | wait until page contains element with reloading ${question_open_form_answer_locator} | 39 | wait until page contains element with reloading ${question_open_form_answer_locator} |
40 | ${question_form_open_form_answer_btn_locator} = replace string ${question_form_open_form_answer_btn_locator_tpl} %title% ${question_id} | 40 | ${question_form_open_form_answer_btn_locator} = replace string ${question_form_open_form_answer_btn_locator_tpl} %title% ${question_id} |
41 | wait until page contains element with reloading ${question_form_open_form_answer_btn_locator} | 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 | get question information | 46 | get question information |
51 | [Arguments] ${question_id} ${field_name} | 47 | [Arguments] ${question_id} ${field_name} |
@@ -20,6 +20,9 @@ ${question_form_create_questionform_related_lot_input_locator} = jquery=.fanc | @@ -20,6 +20,9 @@ ${question_form_create_questionform_related_lot_input_locator} = jquery=.fanc | ||
20 | ${question_form_create_questionform_related_lot_input_locator_tpl} = jquery=.fancybox-is-open .fancybox-content #questionform-related_lot option:contains("%type_id%") | 20 | ${question_form_create_questionform_related_lot_input_locator_tpl} = jquery=.fancybox-is-open .fancybox-content #questionform-related_lot option:contains("%type_id%") |
21 | ${question_form_open_create_btn_locator} = jquery=#tender-part-pjax a[href*="/tender/question-create"]:first | 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 | #for viewer | 26 | #for viewer |
24 | ${question_answer_value_locator_tpl} = jquery=#tender-question-list .js-item div[data-title*="%title%"] .info-row.answer span.value | 27 | ${question_answer_value_locator_tpl} = jquery=#tender-question-list .js-item div[data-title*="%title%"] .info-row.answer span.value |
25 | ${question_title_value_locator_tpl} = jquery=#tender-question-list .js-item div[data-title*="%title%"] h4.callout__title | 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,6 +70,15 @@ def get_is_element_exist(locator): | ||
70 | return True | 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 | # convert locator to jquery locator | 82 | # convert locator to jquery locator |
74 | def convert_locator_to_jquery(locator): | 83 | def convert_locator_to_jquery(locator): |
75 | locator_params = locator.split('=', 1) | 84 | locator_params = locator.split('=', 1) |
@@ -15,7 +15,7 @@ open new tender form | @@ -15,7 +15,7 @@ open new tender form | ||
15 | open page and wait element by locator ${broker_baseurl}/tender/create ${tender_form_locator} | 15 | open page and wait element by locator ${broker_baseurl}/tender/create ${tender_form_locator} |
16 | 16 | ||
17 | update tender queue | 17 | update tender queue |
18 | - [Documentation] запускає оновлення планів з ЦБД і додає їх в чергу, тобто синхронізація може відбутися не відразу | 18 | + [Documentation] запускає оновлення тендерів з ЦБД і додає їх в чергу, тобто синхронізація може відбутися не відразу |
19 | ... поточна сторіка повертається | 19 | ... поточна сторіка повертається |
20 | 20 | ||
21 | ${current_url} = get location | 21 | ${current_url} = get location |
Please
register
or
login
to post a comment