示例#1
0
文件: test_run.py 项目: WolfGung/Otus
def test010(start_browser):
    """
    Test type = negative
    Login with NONE password
    :param start_browser: browser run
    """
    driver = start_browser
    login_input(driver, login="******")
    accept_button_click(driver)
    current_url = driver.current_url
    error_text = get_warning_message(driver)
    correct_error = "Warning: No match for E-Mail Address and/or Password."
    logging.debug("Current web url is {}".format(current_url))
    logging.debug("Error text is {}".format(error_text))
    assert correct_error == error_text
示例#2
0
文件: test_run.py 项目: WolfGung/Otus
def test001(start_browser, address):
    """
    Test type - positive
    Login with valid parameters
    :param start_browser: browser run
    :param address: parametrized opencart url
    """
    driver = start_browser
    driver.get(address)
    login_input(driver, login="******")
    password_input(driver, password="******")
    accept_button_click(driver)
    current_url = driver.current_url
    success_login_url = address
    logging.debug("Current web url is {}".format(current_url))
    assert current_url == success_login_url
示例#3
0
文件: test_run.py 项目: WolfGung/Otus
def test002(start_browser, address):
    """
    Test type - positive
    Login with valid parameters. E-Mail Address in uppercase.
    :param address: parametrized opencart url
    :param start_browser: browser run
    """
    driver = start_browser
    driver.get(address)
    login_input(driver, login="******")
    password_input(driver, password="******")
    accept_button_click(driver)
    current_url = driver.current_url
    success_login_url = address
    logging.debug("Current web url is {}".format(current_url))
    assert driver.current_url == success_login_url
示例#4
0
文件: test_run.py 项目: WolfGung/Otus
def test008(start_browser, address):
    """
    Test type = positive
    Login with valid parameters. Have numbers in password
    :param start_browser: browser run
    :param address: parametrized opencart address
    """
    driver = start_browser
    driver.get(address)
    login_input(driver, login="******")
    password_input(driver, password="******")
    accept_button_click(driver)
    current_url = driver.current_url
    success_login_url = address
    logging.debug("Current web url is {}".format(current_url))
    assert driver.current_url == success_login_url
示例#5
0
文件: test_run.py 项目: WolfGung/Otus
def test005(start_browser, address):
    """
    Test type - negative
    Login with invalid password
    :param address: parametrized opencart address
    :param start_browser:  browser run
    """
    driver = start_browser
    driver.get(address)
    login_input(driver, login="******")
    password_input(driver, password="******")
    accept_button_click(driver)
    current_url = driver.current_url
    error_text = get_warning_message(driver)
    correct_error = "Warning: No match for E-Mail Address and/or Password."
    logging.debug("Current web url is {}".format(current_url))
    logging.debug("Error text is {}".format(error_text))
    assert correct_error == error_text