title: Navigating a Website with Selenium Webdriver
body: <p>My goal is to automate online bill pay using Selenium for Python. </p>
  
  <p>Login was successful using Webdriver with this code:</p>
  
  <pre><code>from selenium import webdriver
  browser = webdriver.Firefox()
  browser.get('https://website.com/Home')
  emailElem = browser.find_element_by_id('UserName') #finds login username field 
  emailElem.send_keys('username') #enter the username
  passwordElem = browser.find_element_by_id('UserPassword') #finds pw field
  passwordElem.send_keys('password') #enters pw
  passwordElem.submit() #presses submit button
  </code></pre>
  
  <p>After login, a new page loads, and my next step is to click on a link. The code: </p>
  
  <pre><code>browser.implicitly_wait(3) #allow new page to load (also tried 5 seconds)
  click_link = browser.find_element_by_link_text("Bill &amp; Payment")
  click_link.click()
  </code></pre>
  
  <p>And nothing happens. No navigation to the Bill &amp; Payment page. The actual link has a <code>&lt;BR&gt;</code> tag in it, so I also tried including the tag:</p>
  
  <pre><code>click_link = browser.find_element_by_link_text("Bill &amp;&lt;BR&gt;Payment")
  </code></pre>
  
  <p>But still nothing. What are some other things I should try?</p>
  
  <p>Errors:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "/home/captain/.PyCharmEdu30/config/scratches/scratch_1.py", line 12, in 
        click_link = browser.find_element_by_link_text("Bill &amp; Payment")#clicks link on next page</p>
    
    <p>File "/home/captain/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 317, in find_element_by_link_text
        return self.find_element(by=By.LINK_TEXT, value=link_text)</p>
    
    <p>File "/home/captain/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
        'value': value})['value']</p>
    
    <p>File "/home/captain/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
        self.error_handler.check_response(response)</p>
    
    <p>File "/home/captain/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"link text","selector":"Bill &amp; Payment"}</p>
    
    <p>Stacktrace:
        at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmps7uj9u0l/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
        at fxdriver.Timer.prototype.setTimeout/&lt;.notify (file:///tmp/tmps7uj9u0l/extensions/fxdriver@googlecode.com/components/driver-component.js:625)</p>
  </blockquote>