mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
webdriver: Add handle any user prompts
step for all commands (#38035)
- Add `handler any user prompt` step for all commands. - Enable webdriver tests which were blocked by `handle any user prompt` step. --------- Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
This commit is contained in:
parent
18d1a62add
commit
345733a5c5
66 changed files with 859 additions and 472 deletions
|
@ -14,7 +14,7 @@ use servo::servo_geometry::DeviceIndependentPixel;
|
|||
use servo::{
|
||||
AlertResponse, AuthenticationRequest, ColorPicker, ConfirmResponse, FilterPattern,
|
||||
PermissionRequest, PromptResponse, RgbColor, SelectElement, SelectElementOption,
|
||||
SelectElementOptionOrOptgroup, SimpleDialog,
|
||||
SelectElementOptionOrOptgroup, SimpleDialog, WebDriverUserPrompt,
|
||||
};
|
||||
|
||||
pub enum Dialog {
|
||||
|
@ -582,6 +582,16 @@ impl Dialog {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn webdriver_diaglog_type(&self) -> WebDriverUserPrompt {
|
||||
match self {
|
||||
Dialog::File { .. } => WebDriverUserPrompt::File,
|
||||
Dialog::SimpleDialog(SimpleDialog::Alert { .. }) => WebDriverUserPrompt::Alert,
|
||||
Dialog::SimpleDialog(SimpleDialog::Confirm { .. }) => WebDriverUserPrompt::Confirm,
|
||||
Dialog::SimpleDialog(SimpleDialog::Prompt { .. }) => WebDriverUserPrompt::Prompt,
|
||||
_ => WebDriverUserPrompt::Default,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn make_dialog_label(message: &str, ui: &mut egui::Ui, input_text: Option<&mut String>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue