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)
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
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
def test_lazy_inner_ss(): given_at_other_page() s("#todo-list").ss("li") s("#todo-list").find_all("li") # alias
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
def test_lazy_find(): given_at_other_page() task_a = ss("#todo-list>li").find(text("a"))
def test_lazy_getitem(): given_at_other_page() firstTask = ss("#todo-list>li")[0]
def test_lazy_filter(): given_at_other_page() visibleTasks = ss("#todo-list>li").filter(visible)
def test_lazy_ss(): given_at_other_page() tasks = ss("#todo-list>li")
def test_assure_absent(): given_at_other_page() s("#new-todo").assure_not(exist)