Exemplo n.º 1
0
def test_otus():
    browser.open_url('https://otus.ru/')
    # print(browser.title())  # 'Онлайн курсы для профессионалов'
    browser.element(by.text('Отзывы')).click()
    el = browser.elements(by.css('.review-tile')).first().text
    print(el)
    browser.should(have.text('Selenium'))
def test_add_tasks():
    browser.open_url(todomvc_url)
    browser.should(have.js_returned_true(is_TodoMVC_loaded))

    s('#new-todo').set_value('a').press_enter()
    s('#new-todo').set_value('b').press_enter()
    s('#new-todo').set_value('c').press_enter()

    ss("#todo-list>li").should(have.texts('a', 'b', 'c'))
def authenticate():
    logging.info("authentication has been initiated.")
    browser.open_url(base_url)

    page.login.should(be.visible).set(credentials['username'])
    page.password.should(be.visible).set(credentials['password'])
    page.submit.click()

    browser.should(have.url(urljoin(base_url, "dashboard")))
    logging.info("authentication has been successful.")
def xtest_add_tasks():
    browser.open_url(todomvc_url)
    browser.should(have.js_returned_true(is_TodoMVC_loaded))

    s('#new-todo').set_value('a').press_enter()
    s('#new-todo').set_value('b').press_enter()
    s('#new-todo').set_value('c').press_enter()

    config.timeout = 0.5
    with pytest.raises(TimeoutException) as ex:
        ss("#todo-list>li").should(have.size(3))

    assert "actual: 6" in ex.value.msg
Exemplo n.º 5
0
 def test_sign_in_button_on_forgot_password_form(self):
     page = forgot_password_methods.ForgotPasswordPage(driver)
     page.click_forgot_password_button()
     page.click_sign_in_button()
     browser.should(have.url(exact_value="https://staging.onestopwellness.ai/signin"))
Exemplo n.º 6
0
def test_login():
    browser.should(have.title('Trotec Production Center'))
    MainPage().remove_all_jobs()
Exemplo n.º 7
0
 def test_login_with_valid_data(self):
     page = login_methods.LoginPage(driver)
     page.user_login_with_valid_user()
     browser.wait_for(s(DashboardPageLocators.HEADER), be.visible)
     browser.should(
         have.url("https://staging.onestopwellness.ai/dashboard"))