MCPcopy Create free account
hub / github.com/PageBot/PageBot / getElement

Method getElement

Lib/pagebot/elements/element.py:637–649  ·  view source on GitHub ↗

Answers the page element, if it has a unique element Id. Answers None if the eId does not exist as child. >>> e1 = Element(name='Child') >>> e = Element(name='Parent', elements=[e1]) >>> child = e.getElement(e1.eId) >>> child is e1 True >>> e.

(self, eId)

Source from the content-addressed store, hash-verified

635 return None
636
637 def getElement(self, eId):
638 """Answers the page element, if it has a unique element Id. Answers None
639 if the eId does not exist as child.
640
641 >>> e1 = Element(name='Child')
642 >>> e = Element(name='Parent', elements=[e1])
643 >>> child = e.getElement(e1.eId)
644 >>> child is e1
645 True
646 >>> e.getElement('FalseId') is None
647 True
648 """
649 return self._eIds.get(eId)
650
651 def getElementPage(self):
652 """Recursively answers the page of this element. This can be several

Callers 1

drawFlowConnectionsMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected