def test_find_links_by_partial_text_nested_elements(browser, app_url):
    """
    When text is split in multiple child elements of a parent link element
    Then the parent link element is found
    """
    browser.visit(app_url)

    expected = "http://localhost:5000/nested"

    link = browser.links.find_by_partial_text("Nested text")[0]
    assert expected == link["href"]

    link = browser.links.find_by_partial_text("in a link")[0]
    assert expected == link["href"]

    link = browser.links.find_by_partial_text("Nested text in")[0]
    assert expected == link["href"]

    link = browser.links.find_by_partial_text("text in a link")[0]
    assert expected == link["href"]

    link = browser.links.find_by_partial_text("Nested text in a link")[0]
    assert expected == link["href"]

    When text is split in multiple child elements of a parent link element
    Then the parent link element is found
    
tests/test_all_drivers/test_find_elements.py