Beispiel #1
0
def _send_keys(LOCATOR, BY, STRING):
    with allure.step(
            f"Send Keys by : {BY} LOCATOR: {LOCATOR}  TYPE : {STRING}"):
        SharedDriver(_driver)._send_keys(LOCATOR, BY, STRING)
Beispiel #2
0
def _hit_enter(LOCATOR, BY):
    with allure.step(f'Hit Enter Button LOCATOR {LOCATOR}, By : {BY}'):
        SharedDriver(_driver)._hit_enter(LOCATOR, BY)
Beispiel #3
0
def _validate_displayed(LOCATOR, BY):
    with allure.step(
            f'Validate element is presented LOCATOR : {LOCATOR}, By : {BY}'):
        SharedDriver(_driver)._validate_is_displayed(LOCATOR, BY)
Beispiel #4
0
def _click(LOCATOR, BY):
    with allure.step(f"Click BY : {BY} LOCATOR: {LOCATOR}"):
        SharedDriver(_driver)._click(LOCATOR, BY)
Beispiel #5
0
def _validate_url(PATTERN):
    with allure.step(f'validate current url with {PATTERN}'):
        SharedDriver(_driver)._validate_url(PATTERN)
Beispiel #6
0
def _get_cookie_and_assert(COOKIE, PATTERN):
    with allure.step(f'Get cookie "{COOKIE}" and assert "{PATTERN}"'):
        SharedDriver(_driver)._get_cookie_and_assert(COOKIE, PATTERN)
Beispiel #7
0
def _click_on_specific_element_from_the_list(LOCATOR, BY, NUM):
    with allure.step(
            f'Click on specific element from the list "{LOCATOR}", By "{BY}", Num "{NUM}"'
    ):
        SharedDriver(_driver)._click_on_specific_element_from_the_list(LOCATOR, BY, NUM)\
Beispiel #8
0
def _refresh_page():
    with allure.step('Refresh page'):
        SharedDriver(_driver)._refresh_page()
Beispiel #9
0
def _check_js_errors():
    with allure.step(f'Check JS errors'):
        SharedDriver(_driver)._check_javascript_errors()
Beispiel #10
0
def _page_down():
    with allure.step(f'Page Down'):
        SharedDriver(_driver)._page_down()
Beispiel #11
0
def _send_keys_random(LOCATOR, BY):
    with allure.step(f'In field "{LOCATOR}" type random gmail, By "{BY}"'):
        SharedDriver(_driver)._send_keys_random_email(LOCATOR, BY)
Beispiel #12
0
def _time_wait(SEC):
    with allure.step(f'Wait "{SEC}"'):
        SharedDriver(_driver)._time_wait(SEC)
Beispiel #13
0
def _clean_cookies():
    with allure.step(f'Clean Cookies'):
        SharedDriver(_driver)._clean_cookies()
Beispiel #14
0
def _click_on_random_element_from_the_list(LOCATOR, BY):
    with allure.step(
            f"Click on random element from the list LOCATOR : {LOCATOR}, By : {BY}"
    ):
        SharedDriver(_driver)._click_on_random_element_from_the_list(
            LOCATOR, BY)
Beispiel #15
0
def _get_attribute_and_compare(LOCATOR, BY, PATTERN, ATTRIBUTE):
    with allure.step(
            f'Get attribute "{ATTRIBUTE}" of element "{LOCATOR}", by "{BY}" and validate attribute with "{PATTERN}"'
    ):
        SharedDriver(_driver)._get_attribute_and_compare(
            LOCATOR, BY, PATTERN, ATTRIBUTE)
Beispiel #16
0
def _validate_text(LOCATOR, BY, STRING):
    with allure.step(
            f'Validate text LOCATOR : {LOCATOR}, STRING : {STRING}, By  : {BY}'
    ):
        SharedDriver(_driver)._validate_text(LOCATOR, BY, STRING)
Beispiel #17
0
def _open_page(request, URL):
    with allure.step('Open Page : mobile view ' +
                     str(request.config.getoption('base_url')) + str(URL)):
        SharedDriver(_driver)._get(
            f"{request.config.getoption('base_url')}{URL}")
Beispiel #18
0
def _execute_script(SCRIPT):
    with allure.step(f'Execute script {SCRIPT}'):
        SharedDriver(_driver)._execute_script(SCRIPT)
Beispiel #19
0
def _validate_source(PATTERN):
    with allure.step(f'Validate source with "{PATTERN}"'):
        SharedDriver(_driver)._validate_page_source(PATTERN)
Beispiel #20
0
def _validate_title(PATTERN):
    with allure.step(f'Validate current title with {PATTERN}'):
        SharedDriver(_driver)._validate_title(PATTERN)
Beispiel #21
0
def _switch_tab():
    with allure.step(f'Switch tab'):
        SharedDriver(_driver)._switch_tab()