Add missing docstrings
This commit is contained in:
parent
8b91a74aef
commit
96bbdb19e6
@ -134,6 +134,7 @@ class WebEngineElement(webelem.AbstractWebElement):
|
||||
self._js_call('set_value', value)
|
||||
|
||||
def caret_position(self):
|
||||
"""Get the text caret position for the current element"""
|
||||
return self._js_dict.get('caret_position', 0)
|
||||
|
||||
def insert_text(self, text):
|
||||
|
@ -127,6 +127,7 @@ class WebKitElement(webelem.AbstractWebElement):
|
||||
self._elem.evaluateJavaScript("this.value='{}'".format(value))
|
||||
|
||||
def caret_position(self):
|
||||
"""Get the text caret position for the current element"""
|
||||
self._check_vanished()
|
||||
pos = self._elem.evaluateJavaScript('this.selectionStart')
|
||||
assert isinstance(pos, (int, float, type(None)))
|
||||
|
Loading…
Reference in New Issue
Block a user