Python - TypeError: unbound method error
<p>Please help, I am new to python and now getting below error </p>

<p>"<em>TypeError: unbound method assertEqual() must be called with ExampleScript14 instance as first argument (got str instance instead)</em>"</p>

<p><strong>for the below code:</strong></p>

<p>from selenium import webdriver
from selenium.webdriver.common.by import By
import unittest
import time
import variables
from time import sleep</p>

<pre><code>class ExampleScript14(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        super(ExampleScript14, cls).setUpClass()
        cls.driver = webdriver.Chrome()
        cls.driver.get(cls.url)
        cls.test_click_the_username()

    @classmethod
    def test_click_the_username(self):

        # Click the USer name
        self.driver.find_element_by_link_text(variables.USER_NAME).click()

        # click the Edit button
        self.driver.find_element_by_id("btnSave").click()

        print "Verify Edit button changed to Save button"

        element = self.driver.find_element_by_id("btnSave")
        element_attribute = element.get_attribute("value").encode('utf8')
        print "attr:", type(element_attribute)
        print "The button value is:", element_attribute

        self.assertEqual("Save", element_attribute)           

if __name__ == "__main__":
    unittest.main()
</code></pre>

<p>You <code>test_click_the_username</code> should not be a <code>classmethod</code>. Just delete <code>@classmethod</code> decorator and it should work.</p>

python selenium