Пример #1
0
def test_assure_not_and_alias_methods():
    given_at_other_page()
    s("#new-todo").should_not(exist)
    s("#new-todo").insist_not(exist)  # alias
    s("#new-todo").should_not(exist)  # alias
    s("#new-todo").should_not_be(exist)  # alias
    s("#new-todo").should_not_have(exist)  # alias
Пример #2
0
def test_is_displayed_fails_with_waiting_if_element_not_exist():
    given_at_other_page()
    original_timeout = config.timeout  # todo: switch to something like s("#todo-list").with_timeout(0.1).is_displayed()
    config.timeout = 0.1
    with pytest.raises(TimeoutException):
        s("#todo-list").is_displayed()
    config.timeout = original_timeout
Пример #3
0
def test_assure_not_and_alias_methods():
    given_at_other_page()
    browser.element("#new-todo").should(be.not_.existing)
    browser.element("#new-todo").should_not(existing)  # alias
    browser.element("#new-todo").should_not_be(existing)  # alias
    browser.element("#new-todo").should_not_have(existing)  # alias