def fill_out(driver: WebDriver, details: dict):
    form_selectors = SELECTORS["form"]
    fill_out_input_fields(driver, form_selectors, details)
    fill_out_textarea_fields(driver, form_selectors, details)
    pick_option(driver, form_selectors, details)
    tick_checkboxes(driver, form_selectors, details)
    tick_captcha_checkbox(driver)
Пример #2
0
def search(driver: WebDriver, country: str, category: str):
    form_selectors = SELECTORS["search form"]
    find_a_marketplace = find_element(
        driver, SEARCH_BUTTON, element_name="find your marketplace"
    )
    scroll_to(driver, find_a_marketplace)
    details = generate_form_details(country, category)
    pick_option(driver, form_selectors, form_details=details)
    find_a_marketplace.click()
    take_screenshot(driver, "After submitting the form")
Пример #3
0
def fill_out(driver: WebDriver,
             contact_us_details: dict,
             *,
             captcha: bool = True):
    form_selectors = SELECTORS["form"]

    fill_out_input_fields(driver, form_selectors, contact_us_details)
    fill_out_textarea_fields(driver, form_selectors, contact_us_details)
    pick_option(driver, form_selectors, contact_us_details)
    tick_checkboxes_by_labels(driver, form_selectors, contact_us_details)

    if contact_us_details["captcha"]:
        tick_captcha_checkbox(driver)
def fill_out(driver: WebDriver, details: dict):
    form_selectors = SELECTORS["enter your business details"]
    pick_option(driver, form_selectors, details)
    fill_out_input_fields(driver, form_selectors, details)
Пример #5
0
def fill_out(driver: WebDriver, details: dict):
    form_selectors = SELECTORS["find new markets"]
    pick_option(driver, form_selectors, details)