Fix: click_button for windows
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Dorian Zedler 2023-02-17 14:15:56 +01:00
parent 54a0f7f533
commit 78a73bba1a
Signed by: dorian
GPG Key ID: 989DE36109AFA354
1 changed files with 6 additions and 2 deletions

View File

@ -31,6 +31,10 @@ pub fn type_text(text: &str) -> Result<(),()>{
}
#[cfg(target_family = "windows")]
pub fn click_tab() -> Result<(),()> {
simulate::send(simulate::Key::Tab).map_err(|_| ())
pub fn click_button(button: ContinueButton) -> Result<(),()> {
let button = match button {
ContinueButton::Tab => simulate::Key::Tab,
ContinueButton::Enter => simulate::Key::Return,
};
simulate::send(button).map_err(|_| ())
}