parent
5f22affa36
commit
9f5f362533
@ -1484,6 +1484,10 @@ class CommandDispatcher:
|
||||
return
|
||||
|
||||
text = elem.value()
|
||||
if text is None:
|
||||
message.error("Could not get text from the focused element.")
|
||||
return
|
||||
|
||||
ed = editor.ExternalEditor(self._tabbed_browser)
|
||||
ed.editing_finished.connect(functools.partial(
|
||||
self.on_editing_finished, elem))
|
||||
|
@ -139,7 +139,7 @@ class AbstractWebElement(collections.abc.MutableMapping):
|
||||
raise NotImplementedError
|
||||
|
||||
def value(self):
|
||||
"""Get the value attribute for this element."""
|
||||
"""Get the value attribute for this element, or None."""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_value(self, value):
|
||||
|
@ -91,7 +91,7 @@ class WebEngineElement(webelem.AbstractWebElement):
|
||||
return self._js_dict['outer_xml']
|
||||
|
||||
def value(self):
|
||||
return self._js_dict['value']
|
||||
return self._js_dict.get('value', None)
|
||||
|
||||
def set_value(self, value):
|
||||
js_code = javascript.assemble('webelem', 'set_value', self._id, value)
|
||||
|
Loading…
Reference in New Issue
Block a user