Python Attribute Error: object has no attribute 'self' Python Attribute Error: object has no attribute 'self' selenium selenium

Python Attribute Error: object has no attribute 'self'


I installed selenium with pip under Python 2.7 and changed the code to use Chrome driver[1] instead and changed the checker to make sure there would be some input tags being found. full code below. I'm running the code on Mac OS X. it works just fine.

So I guess the issue here is not the code. (Windows is not a friend of Python, perhaps :).

from selenium import webdriverclass UIInterface(object):    def __init__(self):        self.driver = webdriver.Chrome()        self.driver.get('http://duckduckgo.com')    def parentMethod(self, itemClassName = ''):        allElements = self.getAllElements()        result = [el for el in allElements]        print('===', result)        return result    def getAllElements(self):        return self.driver.find_elements_by_tag_name('input')class InterfaceChild(UIInterface):    def __init__(self):        super(InterfaceChild, self).__init__()    def childMethod(self):        returnedList = self.parentMethod(itemClassName = 'SomeClassName')        for item in returnedList:            print item.get_attribute('innerHTML')if __name__ == '__main__':    ieInterface = InterfaceChild()    ieInterface.childMethod()

The output looks like:

('===', [<selenium.webdriver.remote.webelement.WebElement object at 0x10e145cd0>, <selenium.webdriver.remote.webelement.WebElement object at 0x10e145d10>, <selenium.webdriver.remote.webelement.WebElement object at 0x10e145d50>])

[1] http://chromedriver.storage.googleapis.com/index.html?path=2.9/