browser_commander/puppeteer/api/
page_2.rs1#![allow(clippy::all, missing_docs, unused_imports, non_snake_case)]
5
6use serde_json::Value;
7
8use super::*;
9use crate::puppeteer::bridge::{binary, remote_type, BridgeError, JsFunction, Remote};
10
11impl Page {
12 pub async fn resize(&self, params: Value) -> Result<(), BridgeError> {
18 self.remote.call("resize", vec![Some(params)]).await
19 }
20
21 pub async fn window_id(&self) -> Result<String, BridgeError> {
27 self.remote.call("windowId", vec![]).await
28 }
29
30 pub async fn open_dev_tools(&self) -> Result<Page, BridgeError> {
36 self.remote.call("openDevTools", vec![]).await
37 }
38
39 pub async fn has_dev_tools(&self) -> Result<bool, BridgeError> {
45 self.remote.call("hasDevTools", vec![]).await
46 }
47
48 pub async fn bluetooth(&self) -> Result<BluetoothEmulation, BridgeError> {
54 self.remote.get("bluetooth").await
55 }
56
57 pub async fn trigger_extension_action(&self, extension: &Extension) -> Result<(), BridgeError> {
63 self.remote.call("triggerExtensionAction", vec![Some(extension.remote().to_wire())]).await
64 }
65
66 pub async fn extension_realms(&self) -> Result<Vec<Realm>, BridgeError> {
72 self.remote.call("extensionRealms", vec![]).await
73 }
74}