Example #1
0
def test_assure_not_and_alias_methods():
    given_at_other_page()
    s("#new-todo").assure_not(exist)
    s("#new-todo").insist_not(exist)
    s("#new-todo").should_not(exist)
    s("#new-todo").should_not_be(exist)
    s("#new-todo").should_not_have(exist)
Example #2
0
def test_assure_not_and_alias_methods():
    given_at_other_page()
    s("#new-todo").assure_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
Example #3
0
def test_is_displayed_fails_with_waiting_if_element_not_exist():
    given_at_other_page()
    original_timeout = config.timeout  # todo: switch to s("#todo-list").during(0.1).is_displayed()
    # todo: once the feature available
    config.timeout = 0.1
    with pytest.raises(TimeoutException):
        s("#todo-list").is_displayed()
    config.timeout = original_timeout
Example #4
0
def test_lazy_inner_ss():
    given_at_other_page()
    s("#todo-list").ss("li")
    s("#todo-list").find_all("li")  # alias
Example #5
0
def test_lazy_inner_s():
    given_at_other_page()
    s("#todo-list>li:nth-of-type(1)").s(".toggle")
    s("#todo-list>li:nth-of-type(1)").find(".toggle")  # alias
Example #6
0
def test_lazy_find():
    given_at_other_page()
    task_a = ss("#todo-list>li").find(text("a"))
Example #7
0
def test_lazy_getitem():
    given_at_other_page()
    firstTask = ss("#todo-list>li")[0]
Example #8
0
def test_lazy_filter():
    given_at_other_page()
    visibleTasks = ss("#todo-list>li").filter(visible)
Example #9
0
def test_lazy_ss():
    given_at_other_page()
    tasks = ss("#todo-list>li")
Example #10
0
def test_assure_absent():
    given_at_other_page()
    s("#new-todo").assure_not(exist)