Open triquetra011 opened 11 years ago
Easiest (not necessarily the best) solution:
WebElements/Base.py: def getChildElementWithId(self, elementId): """ Returns all elements with the id specified """ childrenWithId = None for child in self: ----> if not hasattr(child, 'id'): ----> continue if child.id == elementId: return child
Thanks! Issue has been verified and a fix (likely the one you suggested) will be included in beta 3.
In [88]: page = WebElements.Document.Document()
In [89]: page.body.getChildElementWithId('a')
In [90]: page += WebElements.Display.Label()
In [91]: page.body.getChildElementWithId('')
AttributeError Traceback (most recent call last)