title: PhantomJS does not navigate to the next page after clicking a link
body: <p>I am having a strange issue with <code>PhantomJS</code> or may be I am newbie. I am trying to login on NewEgg.com via Selenium by using PhantomJS. I am using Python for it. Issue is, when I use Firefox as a driver it works well but as soon as I set <code>PhantomJS</code> as a driver it does not go to next page hence give message:</p>
  
  <pre><code>Exception Message: u'{"errorMessage":"Unable to find element with id \'UserName\'","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"89","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:55372","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{\\"using\\": \\"id\\", \\"sessionId\\": \\"aaff4c40-6aaa-11e4-9cb1-7b8841e74090\\", \\"value\\": \\"UserName\\"}","url":"/element","urlParsed":{"anchor":"","query":"","file":"element","directory":"/","path":"/element","relative":"/element","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/element","queryKey":{},"chunks":["element"]},"urlOriginal":"/session/aaff4c40-6aaa-11e4-9cb1-7b8841e74090/element"}}' ; Screenshot: available via screen 
  </code></pre>
  
  <p>The reason I found after taking screenshot that phantom could not navigate the page and script got finished. How do I sort this out? Code Snippet I tried given below:</p>
  
  <p>import requests
  from bs4 import BeautifulSoup
  from time import sleep
  from selenium import webdriver
  import datetime</p>
  
  <pre><code>my_username = "user@mail.com"
  my_password = "password"
  
  driver = webdriver.PhantomJS('/Setups/phantomjs-1.9.7-macosx/bin/phantomjs')
  firefox_profile = webdriver.FirefoxProfile()
  #firefox_profile.set_preference('permissions.default.stylesheet', 2)
  firefox_profile.set_preference('permissions.default.image', 2)
  firefox_profile.set_preference('dom.ipc.plugins.enabled.libflashplayer.so', 'false')
  #driver = webdriver.Firefox(firefox_profile)
  driver.set_window_size(1120, 550)
  driver.get('http://newegg.com')
  driver.find_element_by_link_text('Log in or Register').click()
  driver.save_screenshot('screen.png')
  </code></pre>
  
  <p>I even put <code>sleep</code> but it is not making any difference.</p>