mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script(webdriver): Check if element is keyboard interactable in element send keys (#38235)
Step 7.6 of remote end steps of [Element Send Keys](https://w3c.github.io/webdriver/#element-send-keys) > If element is not [keyboard-interactable](https://w3c.github.io/webdriver/#dfn-keyboard-interactable), return [error](https://w3c.github.io/webdriver/#dfn-error) with [error code](https://w3c.github.io/webdriver/#dfn-error-code) [element not interactable](https://w3c.github.io/webdriver/#dfn-element-not-interactable). --------- Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
This commit is contained in:
parent
f726737f24
commit
d95dd69e3c
3 changed files with 24 additions and 10 deletions
|
@ -1740,6 +1740,15 @@ impl Element {
|
|||
}
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#document-element>
|
||||
pub(crate) fn is_document_element(&self) -> bool {
|
||||
if let Some(ref document_element) = self.owner_document().GetDocumentElement() {
|
||||
**document_element == *self
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn is_focusable_area(&self) -> bool {
|
||||
if self.is_actually_disabled() {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue