mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
webdriver: Support "scroll into view" for commands (#38508)
Implement scroll into view steps for all WebDriver command that requires it (element click, element send keys, element clear, and take element screenshot). Testing: `element_send_keys/scroll_into_view.py`, `element_click/scroll_into_view.py`, `element_clear/clear.py` --------- Signed-off-by: PotatoCP <Kenzie.Raditya.Tirtarahardja@huawei.com>
This commit is contained in:
parent
9e9bd80bba
commit
097a69169a
7 changed files with 73 additions and 25 deletions
|
@ -2400,8 +2400,9 @@ impl Handler {
|
|||
self.handle_any_user_prompts(webview_id)?;
|
||||
|
||||
// Step 3 - 4
|
||||
let cmd = WebDriverScriptCommand::GetBoundingClientRect(element.to_string(), sender);
|
||||
self.browsing_context_script_command(cmd, VerifyBrowsingContextIsOpen::No)?;
|
||||
let cmd =
|
||||
WebDriverScriptCommand::ScrollAndGetBoundingClientRect(element.to_string(), sender);
|
||||
self.browsing_context_script_command(cmd, VerifyBrowsingContextIsOpen::Yes)?;
|
||||
|
||||
match wait_for_ipc_response(receiver)? {
|
||||
Ok(rect) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue