Exemple #1
0
def test_duckduckgo_search_manual(browser):
    search_page = DuckDuckGoSearchPage(browser)
    result_page = DuckDuckGoResultPage(browser)
    PHRASE = "panda"

    search_page.load()

    search_page.search_manual(PHRASE)

    assert PHRASE in result_page.title()
Exemple #2
0
def test_duckduckgo_click_result(browser):
    search_page = DuckDuckGoSearchPage(browser)
    result_page = DuckDuckGoResultPage(browser)
    result_link_page = DuckDuckGoResultLinkPage(browser)
    PHRASE = "panda"

    search_page.load()
    search_page.search_manual(PHRASE)

    title = result_page.click_result_random()

    assert title in result_link_page.title()
Exemple #3
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)