diff --git a/cli/src/commands.rs b/cli/src/commands.rs index e098387..d7e1e6d 100644 --- a/cli/src/commands.rs +++ b/cli/src/commands.rs @@ -2180,7 +2180,33 @@ fn parse_find(rest: &[&str], id: &str) -> Result { _ => "find [action] [text]", }, })?; - let subaction = rest.get(2).unwrap_or(&"click"); + let raw_subaction = rest.get(2).copied(); + if let Some(s) = raw_subaction { + if s.starts_with("--") { + return Err(ParseError::InvalidValue { + message: format!( + "Missing action verb for `find {locator}` (got `{flag}` where action was expected).\n\ + Valid actions: click, fill, check, hover, text\n\ + Did you mean: agent-browser find {locator} click {flag} ...?", + locator = locator, + flag = s, + ), + usage: match *locator { + "role" => "find role [--name ] [--exact]", + "text" => "find text [--exact]", + "label" => "find label