def METHOD_NAME(driver, pages):
    pages.load("xhtmlTest.html")
    current = driver.current_window_handle
    driver.find_element(By.LINK_TEXT, "Open new window").click()
    assert driver.title == "XHTML Test Page"
    handles = driver.window_handles
    handles.remove(current)
    driver.switch_to.window(handles[0])
    assert driver.title == "We Arrive Here"
    pages.load("iframes.html")
    handle = driver.current_window_handle
    driver.find_element(By.ID, "iframe_page_heading")
    driver.switch_to.frame(driver.find_element(By.ID, "iframe1"))
    assert driver.current_window_handle == handle