title: Getting the error AttributeError: 'WebDriver' object has no attribute 'GoTo'" when executing a python script in selenium
body: <p>I am using selenium with python for automation. Here are the two .py files I have created:</p>
  
  <p><strong>Browser.py:</strong></p>
  
  <pre><code>from selenium import webdriver
  
  class Browser:
  
      def GoTo(self, url):
          browser.get(url)
  
  browser = webdriver.Firefox()
  </code></pre>
  
  <p><strong>Login.py:</strong></p>
  
  <pre><code>import unittest
  from Browser import *
  
  class Test(unittest.TestCase):
  
      def setUp(self):
          pass
  
      def test_Can_Login(self):
          browser.GoTo("http://www.google.co.in")
  
  if __name__ == "__main__":
      unittest.main()
  </code></pre>
  
  <p>When I run Login.py, Firefox opens but does nothing. It throws an error saying:</p>
  
  <pre><code>"Traceback (most recent call last):
    File "/media/Pinku/Tests/src/Login.py", line 10, in test_Can_Login
      browser.GoTo("http://www.google.co.in")
  AttributeError: 'WebDriver' object has no attribute 'GoTo'"
  </code></pre>
  
  <p>Am I overlooking something here. Posting this after trying hard to find the mistake.Please help!</p>