# Path: tests/integration/helpers/givenpage.py
# class GivenPage:
#     def __init__(self, driver):
#         self._driver = driver
# 
#     def load_body_with_timeout(self, body, timeout):
#         return LoadedHtmlPage(self._driver).render_body_with_timeout(
#             body, timeout
#         )
# 
#     def opened_with_body_with_timeout(self, body, timeout):
#         return LoadingHtmlPage(timeout, body).load_in(self._driver)
# 
#     def opened_with_body(self, body):
#         return self.opened_with_body_with_timeout(body, 0)
# 
#     def opened_empty(self):
#         return LoadingHtmlPage().load_in(self._driver)
# 
#     def load_body(self, body):
#         return LoadedHtmlPage(self._driver).render_body(body)
# 
#     def execute_script_with_timeout(self, script, timeout):
#         LoadedHtmlPage(self._driver).execute_script_with_timeout(
#             script, timeout
#         )


from tests.integration.helpers.givenpage import GivenPage
):
    page = GivenPage(session_browser.driver)
    page.opened_empty()
    elements = session_browser.element('ul').all('.will-appear')
    page.load_body(
        '''
        <ul>Hello to:
            <li class='will-appear'>Bob</li>
            <li class='will-appear'>Kate</li>
        </ul>
        '''
    )
    original_count = len(elements)
    page.load_body(
        '''
        <ul>Hello to:
            <li class='will-appear'>Bob</li>
            <li class='will-appear'>Kate</li>
            <li class='will-appear'>Joe</li>
        </ul>
        '''
    )

    updated_count = len(elements)

    assert updated_count == 3
    assert updated_count != original_count


def test_searches_exactly_inside_parent(session_browser):

# Path: tests/integration/helpers/givenpage.py
# class GivenPage:
#     def __init__(self, driver):
#         self._driver = driver
# 
#     def load_body_with_timeout(self, body, timeout):
#         return LoadedHtmlPage(self._driver).render_body_with_timeout(
#             body, timeout
#         )
# 
#     def opened_with_body_with_timeout(self, body, timeout):
#         return LoadingHtmlPage(timeout, body).load_in(self._driver)
# 
#     def opened_with_body(self, body):
#         return self.opened_with_body_with_timeout(body, 0)
# 
#     def opened_empty(self):
#         return LoadingHtmlPage().load_in(self._driver)
# 
#     def load_body(self, body):
#         return LoadedHtmlPage(self._driver).render_body(body)
# 
#     def execute_script_with_timeout(self, script, timeout):
#         LoadedHtmlPage(self._driver).execute_script_with_timeout(
#             script, timeout
#         )


# Path: tests/integration/collection__inner_collection_lazy_search_test.py
from tests.integration.helpers.givenpage import GivenPage

):
    page = GivenPage(session_browser.driver)
    page.opened_empty()
    elements = session_browser.element('ul').all('.will-appear')
    page.load_body(
        '''
        <ul>Hello to:
            <li class='will-appear'>Bob</li>
            <li class='will-appear'>Kate</li>
        </ul>
        '''
    )
    original_count = len(elements)
    page.load_body(
        '''
        <ul>Hello to:
            <li class='will-appear'>Bob</li>
            <li class='will-appear'>Kate</li>
            <li class='will-appear'>Joe</li>
        </ul>
        '''
    )

    updated_count = len(elements)

    assert updated_count == 3
    assert updated_count != original_count


def test_searches_exactly_inside_parent(session_browser):

    page = GivenPage(session_browser.driver)