title: What is "AttributeError: 'str' object has no attribute 'native_events_enabled" error? it appears when using selenium with python
body: <p>Here my requirement is, have to log in one web page using the below-mentioned block of code. using 2.7.13, selenium 2.45.0, Windows 10. </p>
  
  <pre><code>     class WebJIRA:
  
         driverpath = "path\to\geckodriver.exe"
         driver = webdriver.Firefox(driverpath)
         ConfigRead.defaultvalues()
  
         def login_page(self,username):
           WebJIRA.webdriver.get(jirausername)
  
       main = WebJIRA()
       main.login_jira()
  </code></pre>
  
  <p>but it throws below error.</p>
  
  <pre><code>File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 46, in __init__
      self.NATIVE_EVENTS_ALLOWED and self.profile.native_events_enabled)
  AttributeError: 'str' object has no attribute 'native_events_enabled'
  </code></pre>
  
  <p>Can anyone please help me to get through this one. I'm new to python. 
  <a href="https://stackoverflow.com/questions/48307531/selenium-attributeerror-str-object-has-no-attribute-native-events-enabled">this question </a> explains how to deal with firefoxprofile when it has been passing as 'str', in my case I have to pass a variable(which contains geckodriver path) but both errors are same.</p>