def dump_source_and_screen(driver, path_prefix=''):
    """Dumps a screenshot and page source"""
    driver.save_screenshot('{}screenshot.png'.format(path_prefix))
    html = driver.page_source
    with open('{}source.html'.format(path_prefix), 'wb') as fp:
        fp.write(html)
