Fix word hinting
This commit is contained in:
parent
ffdaf8d470
commit
e051de4843
@ -1094,7 +1094,7 @@ class WordHinter:
|
||||
})
|
||||
|
||||
return (attr_extractors[attr](elem)
|
||||
for attr in extractable_attrs[elem.tagName()]
|
||||
for attr in extractable_attrs[elem.tag_name()]
|
||||
if attr in elem or attr == "text")
|
||||
|
||||
def tag_words_to_hints(self, words):
|
||||
|
@ -327,6 +327,11 @@ class WebElementWrapper(collections.abc.MutableMapping):
|
||||
self._check_vanished()
|
||||
return utils.compact_text(self._elem.toOuterXml(), 500)
|
||||
|
||||
def tag_name(self):
|
||||
"""Get the tag name for the current element."""
|
||||
self._check_vanished()
|
||||
return self._elem.tagName()
|
||||
|
||||
def rect_on_view(self, *, elem_geometry=None, adjust_zoom=True, no_js=False):
|
||||
"""Get the geometry of the element relative to the webview.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user