driver = webdriver.PhantomJS(executable_path='phantomjs.exe')
driver.get('http://www.baidu.com')
driver.find_element_by_id('kw').send_keys('python')
driver.find_element_by_id('su').submit()
print(driver.current_url)
InvalidElementStateException при запуске Selenium Webdriver с PhantomJS