Esempio n. 1
0
        # Login via email

        qalib.WHICH_PLATFORM = ""

        browser, logs = qalib.set_up("chrome", "stdout", "false")

        qalib.load_main_page(browser, logs)
    except:
        result.append("Main page opened")

    try:
        qalib.element_click(browser, logs, 3, By.XPATH,
                            '//*[@id="hs-eu-confirmation-button"]')
        result.append("Cookie is accepted")
    except:
        result.append("Something wrong with cookies")
    try:

        qalib.login(browser, logs, login, password)

        #qalib.wait_until_with_exception(browser, logs, 10, EC.visibility_of_element_located((By.XPATH, "//h2[@class='MuiTypography-root-8 MuiTypography-subtitle2-20']")))

        result.append("Login via email successfully passed")
    except:
        result.append("Login via email failed")

    qalib.result_of_the_test(result)

# qalib.tear_down(browser, logs)
qalib.register_qa_test(name_of_test, description, callback)
Esempio n. 2
0
        #     print("Passed")
        # except Exception:
        #     pass

        # lib.wait_until_with_exception(browser, logs, lib.DEFAULT_TIMEOUT,
        #                              EC.text_to_be_present_in_element(By.XPATH, "//h2[@class='MuiTypography-root MuiTypography-h5']", "Company info"))

        sleep(5)
        lib.element_send_keys(browser, logs, lib.DEFAULT_SLEEP, By.NAME,
                              'companyName', 'Test Registration')
        lib.element_send_keys(browser, logs, lib.DEFAULT_SLEEP, By.NAME,
                              'companyDescription', 'Just for test')
        s2 = browser.find_element_by_id("select-country")
        print(s2.options)
        for opt in s1.options:
            s1.select_by_visible_text('Europe')
        lib.element_send_keys(browser, logs, lib.DEFAULT_SLEEP, By.NAME,
                              'address', 'Test Street')
        lib.element_send_keys(browser, logs, lib.DEFAULT_SLEEP, By.NAME,
                              'email', '*****@*****.**')
        lib.element_click(browser, logs, lib.DEFAULT_SLEEP, By.XPATH,
                          "//div[@class='register-company_container']//form")

    print(social_login + ' Registration test finished successfully', file=logs)
    result = [social_login + ' registration test finished successfully']
    lib.result_of_the_test(result)
    lib.tear_down(browser, logs)


lib.register_qa_test("T-003-006", "Registration with google", callback)