Return None when parent is a null webelement

This commit is contained in:
Kevin Velghe 2016-08-18 23:37:39 +02:00
parent 229faac9cb
commit 7bb4700352

View File

@ -148,7 +148,7 @@ class WebKitElement(webelem.AbstractWebElement):
def parent(self):
self._check_vanished()
elem = self._elem.parent()
if elem is None:
if elem is None or elem.isNull():
return None
return WebKitElement(elem, tab=self._tab)