mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
Implement support for WebDriver send keys command.
Supports sending keys to an element. The specification here is still rather unfinished so the error handling and so on in this code will need iteration as it becomes clearer what the expected behaviour is.
This commit is contained in:
parent
db94fda10e
commit
09b9293b09
7 changed files with 252 additions and 2 deletions
|
@ -61,7 +61,7 @@ pub struct WindowSizeData {
|
|||
pub device_pixel_ratio: ScaleFactor<ViewportPx, DevicePixel, f32>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Deserialize, Serialize)]
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Debug, Deserialize, Serialize)]
|
||||
pub enum KeyState {
|
||||
Pressed,
|
||||
Released,
|
||||
|
@ -360,6 +360,7 @@ pub enum WebDriverCommandMsg {
|
|||
LoadUrl(PipelineId, LoadData, IpcSender<LoadStatus>),
|
||||
Refresh(PipelineId, IpcSender<LoadStatus>),
|
||||
ScriptCommand(PipelineId, WebDriverScriptCommand),
|
||||
SendKeys(PipelineId, Vec<(Key, KeyModifiers, KeyState)>),
|
||||
TakeScreenshot(PipelineId, IpcSender<Option<Image>>),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue