pub enum Commands {
Show 44 variants
Doctor {
offline: bool,
quick: bool,
fix: bool,
json: bool,
},
Commands {
json: bool,
},
Schema {
cmd: String,
},
Version,
Goto {
url: String,
init_script: Option<String>,
handle_before_unload: bool,
navigation_timeout_ms: Option<u64>,
},
View {
verbose: bool,
path: Option<PathBuf>,
},
Press {
target: String,
dblclick: bool,
include_snapshot: bool,
},
ClickAt {
x: f64,
y: f64,
dblclick: bool,
include_snapshot: bool,
},
Write {
target: String,
value: String,
include_snapshot: bool,
},
Keys {
key: String,
include_snapshot: bool,
},
Type {
text: String,
target: Option<String>,
clear: bool,
submit: Option<String>,
focus_only: bool,
},
Wait {
ms: u64,
text: Vec<String>,
selector: Option<String>,
state: Option<String>,
wait_timeout_ms: Option<u64>,
include_snapshot: bool,
},
Hover {
target: String,
include_snapshot: bool,
},
Drag {
from: String,
to: String,
include_snapshot: bool,
},
FillForm {
json: String,
include_snapshot: bool,
},
Upload {
target: String,
path: PathBuf,
include_snapshot: bool,
},
Back,
Forward,
Reload {
ignore_cache: bool,
init_script: Option<String>,
handle_before_unload: bool,
},
Eval {
expression: String,
args: Option<String>,
dialog_action: Option<String>,
file_path: Option<PathBuf>,
},
Grab {
path: Option<PathBuf>,
format: GrabFormat,
full_page: bool,
quality: Option<i32>,
element: Option<String>,
},
Run {
script: PathBuf,
},
Exec {
args: Vec<String>,
},
Extract {
target: String,
attr: Option<String>,
},
Text {
target: String,
},
Scroll {
target: Option<String>,
delta_x: f64,
delta_y: f64,
},
Cookie {
action: CookieAction,
},
Attr {
target: String,
name: String,
},
Assert {
kind: AssertKind,
},
Console {
action: ConsoleAction,
},
Net {
action: NetAction,
},
Page {
action: Option<PageAction>,
},
Dialog {
action: DialogAction,
},
Scrape {
url: String,
},
Emulate {
user_agent: Option<String>,
locale: Option<String>,
timezone: Option<String>,
offline: bool,
latitude: Option<f64>,
longitude: Option<f64>,
media: Option<String>,
network_conditions: Option<String>,
cpu_throttling_rate: Option<f64>,
color_scheme: Option<String>,
extra_headers: Option<String>,
viewport: Option<String>,
},
Resize {
width: i32,
height: i32,
scale: f64,
mobile: bool,
},
Perf {
action: PerfAction,
},
Lighthouse {
url: String,
out_dir: Option<PathBuf>,
device: String,
mode: String,
lighthouse_path: Option<PathBuf>,
},
Screencast {
action: ScreencastAction,
},
Heap {
action: HeapAction,
},
Extension {
action: ExtensionAction,
},
Devtools3p {
action: Devtools3pAction,
},
Webmcp {
action: WebmcpAction,
},
Completions {
shell: CompletionShell,
},
}Variants§
Doctor
Diagnose Chrome install and one-shot readiness
Commands
List available commands
Schema
JSON Schema fragment for a command (agent discovery)
Version
Print CLI version
Goto
Navigate to a URL (one-shot)
Fields
Navigation timeout override in milliseconds
View
Accessibility snapshot with @eN refs
Press
Click an element (selector or @eN)
Fields
ClickAt
Click at page CSS coordinates (requires –experimental-vision)
Write
Fill an input value (select/checkbox/radio/text smart fill)
Keys
Press a keyboard key
Type
Type text (tool-ref type_text). Use –target or –focus-only.
Fields
Wait
Wait for ms and/or text and/or selector and/or load state
Fields
Hover
Hover an element
Drag
Drag from one target to another
FillForm
Fill multiple form fields from JSON [{target|uid,value},...]
Upload
Upload a file to a file input
Back
History back
Forward
History forward
Reload
Reload current page
Fields
Eval
Evaluate JavaScript (expression or function declaration)
Fields
Grab
Capture a screenshot
Fields
format: GrabFormatRun
Run multi-step NDJSON script in one process
Exec
Limited inline subcommand (goto)
Extract
Extract text or attribute from a target
Text
Extract visible text from a target (PRD §7 text)
Scroll
Scroll page or element by delta pixels (PRD §7 scroll)
Fields
Cookie
Cookie jar helpers for the active page (Network domain)
Fields
action: CookieActionAttr
Read one attribute from a target
Assert
Assertions (url / text / console)
Fields
kind: AssertKindConsole
Captured console messages (–capture-console)
Fields
action: ConsoleActionNet
Captured network requests (–capture-network)
Page
Page info or multi-tab management
Fields
action: Option<PageAction>Dialog
Accept or dismiss dialogs
Fields
action: DialogActionScrape
Navigate and return body text
Emulate
Emulate device / network / UA / geo / CPU
Fields
Resize
Resize page viewport
Perf
Performance trace / metrics
Fields
action: PerfActionLighthouse
Run Lighthouse audit (external binary)
Fields
Screencast
Screencast start/stop (experimental)
Fields
action: ScreencastActionHeap
Heap snapshot tools (requires –category-memory for deep analysis)
Fields
action: HeapActionExtension
Chrome extension tools (requires –category-extensions)
Fields
action: ExtensionActionDevtools3p
Third-party developer tools surface (requires –category-third-party)
Fields
action: Devtools3pActionWebmcp
Web surface tools (requires –category-webmcp)
Fields
action: WebmcpActionCompletions
Generate shell completions (path leve, no Chrome)
Fields
shell: CompletionShellTrait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand