playwright_rs/protocol/
mod.rs

1// Copyright 2026 Paul Adamson
2// Licensed under the Apache License, Version 2.0
3//
4// Protocol Objects - Rust representations of Playwright protocol objects
5//
6// This module contains the Rust implementations of all Playwright protocol objects.
7// Each object corresponds to a type in the Playwright protocol (protocol.yml).
8//
9// Architecture:
10// - All protocol objects implement the ChannelOwner trait
11// - Objects are created by the object factory when server sends __create__ messages
12// - Objects communicate with the server via their Channel
13
14pub mod action_options;
15pub mod android;
16pub mod api_request_context;
17pub mod artifact;
18pub mod browser;
19pub mod browser_context;
20pub mod browser_type;
21pub mod click;
22pub mod dialog;
23pub mod download;
24pub mod electron;
25pub mod element_handle;
26pub mod evaluate_conversion;
27pub mod file_payload;
28pub mod frame;
29pub mod keyboard;
30pub mod local_utils;
31pub mod locator;
32pub mod mouse;
33pub mod page;
34pub mod playwright;
35pub mod request;
36pub mod response;
37pub mod root;
38pub mod route;
39pub mod screenshot;
40pub mod select_option;
41pub mod tracing;
42pub mod web_socket;
43
44pub use action_options::{
45    CheckOptions, FillOptions, HoverOptions, KeyboardOptions, MouseOptions, PressOptions,
46    SelectOptions,
47};
48pub use android::Android;
49pub use api_request_context::APIRequestContext;
50pub use browser::Browser;
51pub use browser_context::{
52    BrowserContext, BrowserContextOptions, BrowserContextOptionsBuilder, Cookie, Geolocation,
53    LocalStorageItem, Origin, RecordHar, RecordVideo, StorageState, Viewport,
54};
55pub use browser_type::BrowserType;
56pub use click::{ClickOptions, KeyboardModifier, MouseButton, Position};
57pub use dialog::Dialog;
58pub use download::Download;
59pub use electron::Electron;
60pub use element_handle::ElementHandle;
61pub use evaluate_conversion::{parse_result, parse_value, serialize_argument, serialize_null};
62pub use file_payload::{FilePayload, FilePayloadBuilder};
63pub use frame::Frame;
64pub use keyboard::Keyboard;
65pub use local_utils::LocalUtils;
66pub use locator::Locator;
67pub use mouse::Mouse;
68pub use page::{AddStyleTagOptions, GotoOptions, Page, Response, WaitUntil};
69pub use playwright::Playwright;
70pub use request::Request;
71pub use response::ResponseObject;
72pub use root::Root;
73pub use route::{
74    ContinueOptions, ContinueOptionsBuilder, FulfillOptions, FulfillOptionsBuilder, Route,
75};
76pub use screenshot::{ScreenshotClip, ScreenshotOptions, ScreenshotType};
77pub use select_option::SelectOption;
78pub use tracing::Tracing;
79pub use web_socket::WebSocket;