Fix: click_button for windows
Some checks reported errors
continuous-integration/drone/push Build was killed

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

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(|_| ())
}