Add an assert for tag_name we get from JS

This should help tracking down #2569 once we get another report about it.
This commit is contained in:
Florian Bruhin 2017-04-28 10:33:57 +02:00
parent 7b283cd58e
commit 4f92fe6895

View File

@ -88,7 +88,9 @@ class WebEngineElement(webelem.AbstractWebElement):
The returned name will always be lower-case.
"""
return self._js_dict['tag_name'].lower()
tag = self._js_dict['tag_name']
assert isinstance(tag, str), tag
return tag.lower()
def outer_xml(self):
"""Get the full HTML representation of this element."""