dcap['phantomjs.page.settings.userAgent'] = (
    """Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36"""
    )
driver = webdriver.PhantomJS(desired_capabilities=dcap)
Разница Python Selenium между Firefox и PhantomJS в прокрутке