pub struct BrowserContext { /* private fields */ }Expand description
Channel for the BrowserContext interface (browserContext.yml).
Implementations§
Source§impl BrowserContext
impl BrowserContext
BrowserContext.addCookies (“Add cookies”).
Sourcepub async fn add_init_script(
&self,
params: BrowserContextAddInitScriptParams,
) -> Result<BrowserContextAddInitScriptResult, ProtocolError>
pub async fn add_init_script( &self, params: BrowserContextAddInitScriptParams, ) -> Result<BrowserContextAddInitScriptResult, ProtocolError>
BrowserContext.addInitScript (“Add init script”).
BrowserContext.clearCookies (“Clear cookies”).
Sourcepub async fn clear_permissions(&self) -> Result<(), ProtocolError>
pub async fn clear_permissions(&self) -> Result<(), ProtocolError>
BrowserContext.clearPermissions (“Clear permissions”).
Sourcepub async fn close(
&self,
params: BrowserContextCloseParams,
) -> Result<(), ProtocolError>
pub async fn close( &self, params: BrowserContextCloseParams, ) -> Result<(), ProtocolError>
BrowserContext.close (“Close context”).
BrowserContext.cookies (“Get cookies”).
Sourcepub async fn expose_binding(
&self,
params: BrowserContextExposeBindingParams,
) -> Result<BrowserContextExposeBindingResult, ProtocolError>
pub async fn expose_binding( &self, params: BrowserContextExposeBindingParams, ) -> Result<BrowserContextExposeBindingResult, ProtocolError>
BrowserContext.exposeBinding (“Expose binding”).
Sourcepub async fn grant_permissions(
&self,
params: BrowserContextGrantPermissionsParams,
) -> Result<(), ProtocolError>
pub async fn grant_permissions( &self, params: BrowserContextGrantPermissionsParams, ) -> Result<(), ProtocolError>
BrowserContext.grantPermissions (“Grant permissions”).
Sourcepub async fn new_page(
&self,
) -> Result<BrowserContextNewPageResult, ProtocolError>
pub async fn new_page( &self, ) -> Result<BrowserContextNewPageResult, ProtocolError>
BrowserContext.newPage (“Create page”).
Sourcepub async fn register_selector_engine(
&self,
params: BrowserContextRegisterSelectorEngineParams,
) -> Result<(), ProtocolError>
pub async fn register_selector_engine( &self, params: BrowserContextRegisterSelectorEngineParams, ) -> Result<(), ProtocolError>
BrowserContext.registerSelectorEngine (internal).
Sourcepub async fn set_test_id_attribute_name(
&self,
params: BrowserContextSetTestIdAttributeNameParams,
) -> Result<(), ProtocolError>
pub async fn set_test_id_attribute_name( &self, params: BrowserContextSetTestIdAttributeNameParams, ) -> Result<(), ProtocolError>
BrowserContext.setTestIdAttributeName (internal).
Sourcepub async fn set_extra_http_headers(
&self,
params: BrowserContextSetExtraHTTPHeadersParams,
) -> Result<(), ProtocolError>
pub async fn set_extra_http_headers( &self, params: BrowserContextSetExtraHTTPHeadersParams, ) -> Result<(), ProtocolError>
BrowserContext.setExtraHTTPHeaders (“Set extra HTTP headers”).
Sourcepub async fn set_geolocation(
&self,
params: BrowserContextSetGeolocationParams,
) -> Result<(), ProtocolError>
pub async fn set_geolocation( &self, params: BrowserContextSetGeolocationParams, ) -> Result<(), ProtocolError>
BrowserContext.setGeolocation (“Set geolocation”).
Sourcepub async fn set_http_credentials(
&self,
params: BrowserContextSetHTTPCredentialsParams,
) -> Result<(), ProtocolError>
pub async fn set_http_credentials( &self, params: BrowserContextSetHTTPCredentialsParams, ) -> Result<(), ProtocolError>
BrowserContext.setHTTPCredentials (“Set HTTP credentials”).
Sourcepub async fn set_network_interception_patterns(
&self,
params: BrowserContextSetNetworkInterceptionPatternsParams,
) -> Result<(), ProtocolError>
pub async fn set_network_interception_patterns( &self, params: BrowserContextSetNetworkInterceptionPatternsParams, ) -> Result<(), ProtocolError>
BrowserContext.setNetworkInterceptionPatterns (“Route requests”).
Sourcepub async fn set_web_socket_interception_patterns(
&self,
params: BrowserContextSetWebSocketInterceptionPatternsParams,
) -> Result<(), ProtocolError>
pub async fn set_web_socket_interception_patterns( &self, params: BrowserContextSetWebSocketInterceptionPatternsParams, ) -> Result<(), ProtocolError>
BrowserContext.setWebSocketInterceptionPatterns (“Route WebSockets”).
Sourcepub async fn set_offline(
&self,
params: BrowserContextSetOfflineParams,
) -> Result<(), ProtocolError>
pub async fn set_offline( &self, params: BrowserContextSetOfflineParams, ) -> Result<(), ProtocolError>
BrowserContext.setOffline (“Set offline mode”).
Sourcepub async fn storage_state(
&self,
params: BrowserContextStorageStateParams,
) -> Result<BrowserContextStorageStateResult, ProtocolError>
pub async fn storage_state( &self, params: BrowserContextStorageStateParams, ) -> Result<BrowserContextStorageStateResult, ProtocolError>
BrowserContext.storageState (“Get storage state”).
Sourcepub async fn set_storage_state(
&self,
params: BrowserContextSetStorageStateParams,
) -> Result<(), ProtocolError>
pub async fn set_storage_state( &self, params: BrowserContextSetStorageStateParams, ) -> Result<(), ProtocolError>
BrowserContext.setStorageState (“Set storage state”).
Sourcepub async fn pause(&self) -> Result<(), ProtocolError>
pub async fn pause(&self) -> Result<(), ProtocolError>
BrowserContext.pause (“Pause”).
Sourcepub async fn enable_recorder(
&self,
params: BrowserContextEnableRecorderParams,
) -> Result<(), ProtocolError>
pub async fn enable_recorder( &self, params: BrowserContextEnableRecorderParams, ) -> Result<(), ProtocolError>
BrowserContext.enableRecorder (internal).
Sourcepub async fn disable_recorder(&self) -> Result<(), ProtocolError>
pub async fn disable_recorder(&self) -> Result<(), ProtocolError>
BrowserContext.disableRecorder (internal).
Sourcepub async fn expose_console_api(&self) -> Result<(), ProtocolError>
pub async fn expose_console_api(&self) -> Result<(), ProtocolError>
BrowserContext.exposeConsoleApi (internal).
Sourcepub async fn new_cdp_session(
&self,
params: BrowserContextNewCDPSessionParams,
) -> Result<BrowserContextNewCDPSessionResult, ProtocolError>
pub async fn new_cdp_session( &self, params: BrowserContextNewCDPSessionParams, ) -> Result<BrowserContextNewCDPSessionResult, ProtocolError>
BrowserContext.newCDPSession (“Create CDP session”).
Sourcepub async fn create_temp_files(
&self,
params: BrowserContextCreateTempFilesParams,
) -> Result<BrowserContextCreateTempFilesResult, ProtocolError>
pub async fn create_temp_files( &self, params: BrowserContextCreateTempFilesParams, ) -> Result<BrowserContextCreateTempFilesResult, ProtocolError>
BrowserContext.createTempFiles (internal).
Sourcepub async fn update_subscription(
&self,
params: BrowserContextUpdateSubscriptionParams,
) -> Result<(), ProtocolError>
pub async fn update_subscription( &self, params: BrowserContextUpdateSubscriptionParams, ) -> Result<(), ProtocolError>
BrowserContext.updateSubscription (internal).
Sourcepub async fn clock_fast_forward(
&self,
params: BrowserContextClockFastForwardParams,
) -> Result<(), ProtocolError>
pub async fn clock_fast_forward( &self, params: BrowserContextClockFastForwardParams, ) -> Result<(), ProtocolError>
BrowserContext.clockFastForward (“Fast forward clock “{ticksNumber|ticksString}”“).
Sourcepub async fn clock_install(
&self,
params: BrowserContextClockInstallParams,
) -> Result<(), ProtocolError>
pub async fn clock_install( &self, params: BrowserContextClockInstallParams, ) -> Result<(), ProtocolError>
BrowserContext.clockInstall (“Install clock “{timeNumber|timeString}”“).
Sourcepub async fn clock_pause_at(
&self,
params: BrowserContextClockPauseAtParams,
) -> Result<(), ProtocolError>
pub async fn clock_pause_at( &self, params: BrowserContextClockPauseAtParams, ) -> Result<(), ProtocolError>
BrowserContext.clockPauseAt (“Pause clock “{timeNumber|timeString}”“).
Sourcepub async fn clock_resume(&self) -> Result<(), ProtocolError>
pub async fn clock_resume(&self) -> Result<(), ProtocolError>
BrowserContext.clockResume (“Resume clock”).
Sourcepub async fn clock_run_for(
&self,
params: BrowserContextClockRunForParams,
) -> Result<(), ProtocolError>
pub async fn clock_run_for( &self, params: BrowserContextClockRunForParams, ) -> Result<(), ProtocolError>
BrowserContext.clockRunFor (“Run clock “{ticksNumber|ticksString}”“).
Sourcepub async fn clock_set_fixed_time(
&self,
params: BrowserContextClockSetFixedTimeParams,
) -> Result<(), ProtocolError>
pub async fn clock_set_fixed_time( &self, params: BrowserContextClockSetFixedTimeParams, ) -> Result<(), ProtocolError>
BrowserContext.clockSetFixedTime (“Set fixed time “{timeNumber|timeString}”“).
Sourcepub async fn clock_set_system_time(
&self,
params: BrowserContextClockSetSystemTimeParams,
) -> Result<(), ProtocolError>
pub async fn clock_set_system_time( &self, params: BrowserContextClockSetSystemTimeParams, ) -> Result<(), ProtocolError>
BrowserContext.clockSetSystemTime (“Set system time “{timeNumber|timeString}”“).
Sourcepub async fn credentials_install(&self) -> Result<(), ProtocolError>
pub async fn credentials_install(&self) -> Result<(), ProtocolError>
BrowserContext.credentialsInstall (“Install virtual WebAuthn authenticator”).
Sourcepub async fn credentials_create(
&self,
params: BrowserContextCredentialsCreateParams,
) -> Result<BrowserContextCredentialsCreateResult, ProtocolError>
pub async fn credentials_create( &self, params: BrowserContextCredentialsCreateParams, ) -> Result<BrowserContextCredentialsCreateResult, ProtocolError>
BrowserContext.credentialsCreate (“Create virtual credential for “{rpId}”“).
Sourcepub async fn credentials_get(
&self,
params: BrowserContextCredentialsGetParams,
) -> Result<BrowserContextCredentialsGetResult, ProtocolError>
pub async fn credentials_get( &self, params: BrowserContextCredentialsGetParams, ) -> Result<BrowserContextCredentialsGetResult, ProtocolError>
BrowserContext.credentialsGet (“Get virtual credentials”).
Sourcepub async fn credentials_delete(
&self,
params: BrowserContextCredentialsDeleteParams,
) -> Result<(), ProtocolError>
pub async fn credentials_delete( &self, params: BrowserContextCredentialsDeleteParams, ) -> Result<(), ProtocolError>
BrowserContext.credentialsDelete (“Delete virtual credential”).
Trait Implementations§
Source§impl ChannelType for BrowserContext
impl ChannelType for BrowserContext
Source§type Initializer = BrowserContextInitializer
type Initializer = BrowserContextInitializer
__create__.Source§type Event = BrowserContextEvent
type Event = BrowserContextEvent
Source§fn accepts(interface: &str) -> bool
fn accepts(interface: &str) -> bool
interface can be used as this type (an
ElementHandle is also a JSHandle).Source§fn from_channel(channel: Channel) -> Self
fn from_channel(channel: Channel) -> Self
Source§fn initializer(&self) -> Result<Self::Initializer, ProtocolError>
fn initializer(&self) -> Result<Self::Initializer, ProtocolError>
Source§fn events(&self) -> EventStream<Self::Event>
fn events(&self) -> EventStream<Self::Event>
Source§impl Clone for BrowserContext
impl Clone for BrowserContext
Auto Trait Implementations§
impl !RefUnwindSafe for BrowserContext
impl !UnwindSafe for BrowserContext
impl Freeze for BrowserContext
impl Send for BrowserContext
impl Sync for BrowserContext
impl Unpin for BrowserContext
impl UnsafeUnpin for BrowserContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more