class EmulationOperations
(source)
This domain emulates different environments for the page.
Link
Protocol Emulation domain documentation.
fun canEmulate(): Single<CanEmulateResponse>
Tells whether emulation is supported. |
|
fun clearDeviceMetricsOverride(): Single<ResponseFrame>
Clears the overriden device metrics. |
|
fun clearGeolocationOverride(): Single<ResponseFrame>
Clears the overriden Geolocation Position and Error. |
|
fun events(): Flowable<Event>
Returns flowable capturing all Emulation domains events. |
|
fun resetPageScaleFactor(): Single<ResponseFrame>
Requests that page scale factor is reset to initial values. |
|
fun setCPUThrottlingRate(input: SetCPUThrottlingRateRequest): Single<ResponseFrame>
Enables CPU throttling to emulate slow CPUs. |
|
fun setDefaultBackgroundColorOverride(input: SetDefaultBackgroundColorOverrideRequest): Single<ResponseFrame>
Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. |
|
fun setDeviceMetricsOverride(input: SetDeviceMetricsOverrideRequest): Single<ResponseFrame>
Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). |
|
fun setDocumentCookieDisabled(input: SetDocumentCookieDisabledRequest): Single<ResponseFrame> |
|
fun setEmitTouchEventsForMouse(input: SetEmitTouchEventsForMouseRequest): Single<ResponseFrame> |
|
fun setEmulatedMedia(input: SetEmulatedMediaRequest): Single<ResponseFrame>
Emulates the given media for CSS media queries. |
|
fun setFocusEmulationEnabled(input: SetFocusEmulationEnabledRequest): Single<ResponseFrame>
Enables or disables simulating a focused and active page. |
|
fun setGeolocationOverride(input: SetGeolocationOverrideRequest): Single<ResponseFrame>
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. |
|
fun
Overrides value returned by the javascript navigator object. |
|
fun setPageScaleFactor(input: SetPageScaleFactorRequest): Single<ResponseFrame>
Sets a specified page scale factor. |
|
fun setScriptExecutionDisabled(input: SetScriptExecutionDisabledRequest): Single<ResponseFrame>
Switches script execution in the page. |
|
fun setScrollbarsHidden(input: SetScrollbarsHiddenRequest): Single<ResponseFrame> |
|
fun setTimezoneOverride(input: SetTimezoneOverrideRequest): Single<ResponseFrame>
Overrides default host system timezone with the specified one. |
|
fun setTouchEmulationEnabled(input: SetTouchEmulationEnabledRequest): Single<ResponseFrame>
Enables touch on platforms which do not support them. |
|
fun setUserAgentOverride(input: SetUserAgentOverrideRequest): Single<ResponseFrame>
Allows overriding user agent with the given string. |
|
fun setVirtualTimePolicy(input: SetVirtualTimePolicyRequest): Single<SetVirtualTimePolicyResponse>
Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. |
|
fun
Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android. |
|
fun virtualTimeBudgetExpired(): Flowable<Event>
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. |
|
fun virtualTimeBudgetExpiredTimed(): Flowable<Timed<Event>>
Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. |