コード例 #1
0
def test_duckduckgo_expand_results(browser):
    search_page = DuckDuckGoSearchPage(browser)
    result_page = DuckDuckGoResultPage(browser)
    PHRASE = "panda"

    search_page.load()
    search_page.search_manual(PHRASE)

    count_before_more = result_page.result_link_titles()
    result_page.click_more_results()
    count_after_more = result_page.result_link_titles()

    assert len(count_before_more) < len(count_after_more)
コード例 #2
0
def test_duckduckgo_results_more_results(browser):
    search_page = DuckDuckGoSearchPage(browser)
    result_page = DuckDuckGoResultPage(browser)

    phrase = "Golden retriever"

    search_page.load()
    search_page.search(phrase)
    first_set_of_links = result_page.result_link_titles()
    result_page.click_more_results()
    second_set_of_links = result_page.result_link_titles()

    assert len(second_set_of_links) > len(first_set_of_links)