a QWebElement
's findAll
method returns a QWebElementCollection
, which can be converted to a QList
instance with it's toList()
method. To iterate over a list of matched elements, you could use:
body_element = frame.findFirstElement("body")
for el in body_element.findAll("div").toList():
print el.tagName()