page
AdFrameExplanation
Bases: Enum
Source code in zendriver/cdp/page.py
CREATED_BY_AD_SCRIPT = 'CreatedByAdScript'
class-attribute
instance-attribute
MATCHED_BLOCKING_RULE = 'MatchedBlockingRule'
class-attribute
instance-attribute
PARENT_IS_AD = 'ParentIsAd'
class-attribute
instance-attribute
from_json(json)
classmethod
AdFrameStatus
dataclass
Indicates whether a frame has been identified as an ad and why.
Source code in zendriver/cdp/page.py
ad_frame_type: AdFrameType
instance-attribute
explanations: typing.Optional[typing.List[AdFrameExplanation]] = None
class-attribute
instance-attribute
__init__(ad_frame_type, explanations=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
AdFrameType
Bases: Enum
Indicates whether a frame has been identified as an ad.
Source code in zendriver/cdp/page.py
CHILD = 'child'
class-attribute
instance-attribute
NONE = 'none'
class-attribute
instance-attribute
ROOT = 'root'
class-attribute
instance-attribute
from_json(json)
classmethod
AdScriptId
dataclass
Identifies the bottom-most script which caused the frame to be labelled as an ad.
Source code in zendriver/cdp/page.py
debugger_id: runtime.UniqueDebuggerId
instance-attribute
script_id: runtime.ScriptId
instance-attribute
__init__(script_id, debugger_id)
from_json(json)
classmethod
AppManifestError
dataclass
Error while paring app manifest.
Source code in zendriver/cdp/page.py
column: int
instance-attribute
critical: int
instance-attribute
line: int
instance-attribute
message: str
instance-attribute
__init__(message, critical, line, column)
from_json(json)
classmethod
AppManifestParsedProperties
dataclass
Parsed app manifest properties.
Source code in zendriver/cdp/page.py
scope: str
instance-attribute
__init__(scope)
from_json(json)
classmethod
AutoResponseMode
Bases: Enum
Enum of possible auto-response for permission / prompt dialogs.
Source code in zendriver/cdp/page.py
AUTO_ACCEPT = 'autoAccept'
class-attribute
instance-attribute
AUTO_OPT_OUT = 'autoOptOut'
class-attribute
instance-attribute
AUTO_REJECT = 'autoReject'
class-attribute
instance-attribute
NONE = 'none'
class-attribute
instance-attribute
from_json(json)
classmethod
BackForwardCacheBlockingDetails
dataclass
Source code in zendriver/cdp/page.py
column_number: int
instance-attribute
function: typing.Optional[str] = None
class-attribute
instance-attribute
line_number: int
instance-attribute
url: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(line_number, column_number, url=None, function=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
BackForwardCacheNotRestoredExplanation
dataclass
Source code in zendriver/cdp/page.py
context: typing.Optional[str] = None
class-attribute
instance-attribute
details: typing.Optional[typing.List[BackForwardCacheBlockingDetails]] = None
class-attribute
instance-attribute
reason: BackForwardCacheNotRestoredReason
instance-attribute
type_: BackForwardCacheNotRestoredReasonType
instance-attribute
__init__(type_, reason, context=None, details=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
BackForwardCacheNotRestoredExplanationTree
dataclass
Source code in zendriver/cdp/page.py
children: typing.List[BackForwardCacheNotRestoredExplanationTree]
instance-attribute
explanations: typing.List[BackForwardCacheNotRestoredExplanation]
instance-attribute
url: str
instance-attribute
__init__(url, explanations, children)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
BackForwardCacheNotRestoredReason
Bases: Enum
List of not restored reasons for back-forward cache.
Source code in zendriver/cdp/page.py
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 |
|
ACTIVATION_NAVIGATIONS_DISALLOWED_FOR_BUG1234857 = 'ActivationNavigationsDisallowedForBug1234857'
class-attribute
instance-attribute
APP_BANNER = 'AppBanner'
class-attribute
instance-attribute
BACK_FORWARD_CACHE_DISABLED = 'BackForwardCacheDisabled'
class-attribute
instance-attribute
BACK_FORWARD_CACHE_DISABLED_BY_COMMAND_LINE = 'BackForwardCacheDisabledByCommandLine'
class-attribute
instance-attribute
BACK_FORWARD_CACHE_DISABLED_BY_LOW_MEMORY = 'BackForwardCacheDisabledByLowMemory'
class-attribute
instance-attribute
BACK_FORWARD_CACHE_DISABLED_FOR_DELEGATE = 'BackForwardCacheDisabledForDelegate'
class-attribute
instance-attribute
BACK_FORWARD_CACHE_DISABLED_FOR_PRERENDER = 'BackForwardCacheDisabledForPrerender'
class-attribute
instance-attribute
BROADCAST_CHANNEL = 'BroadcastChannel'
class-attribute
instance-attribute
BROADCAST_CHANNEL_ON_MESSAGE = 'BroadcastChannelOnMessage'
class-attribute
instance-attribute
BROWSING_INSTANCE_NOT_SWAPPED = 'BrowsingInstanceNotSwapped'
class-attribute
instance-attribute
CACHE_CONTROL_NO_STORE = 'CacheControlNoStore'
class-attribute
instance-attribute
CACHE_CONTROL_NO_STORE_COOKIE_MODIFIED = 'CacheControlNoStoreCookieModified'
class-attribute
instance-attribute
CACHE_CONTROL_NO_STORE_HTTP_ONLY_COOKIE_MODIFIED = 'CacheControlNoStoreHTTPOnlyCookieModified'
class-attribute
instance-attribute
CACHE_FLUSHED = 'CacheFlushed'
class-attribute
instance-attribute
CACHE_LIMIT = 'CacheLimit'
class-attribute
instance-attribute
CONFLICTING_BROWSING_INSTANCE = 'ConflictingBrowsingInstance'
class-attribute
instance-attribute
CONTAINS_PLUGINS = 'ContainsPlugins'
class-attribute
instance-attribute
CONTENT_DISCARDED = 'ContentDiscarded'
class-attribute
instance-attribute
CONTENT_FILE_CHOOSER = 'ContentFileChooser'
class-attribute
instance-attribute
CONTENT_FILE_SYSTEM_ACCESS = 'ContentFileSystemAccess'
class-attribute
instance-attribute
CONTENT_MEDIA_DEVICES_DISPATCHER_HOST = 'ContentMediaDevicesDispatcherHost'
class-attribute
instance-attribute
CONTENT_MEDIA_SESSION_SERVICE = 'ContentMediaSessionService'
class-attribute
instance-attribute
CONTENT_SCREEN_READER = 'ContentScreenReader'
class-attribute
instance-attribute
CONTENT_SECURITY_HANDLER = 'ContentSecurityHandler'
class-attribute
instance-attribute
CONTENT_SERIAL = 'ContentSerial'
class-attribute
instance-attribute
CONTENT_WEB_AUTHENTICATION_API = 'ContentWebAuthenticationAPI'
class-attribute
instance-attribute
CONTENT_WEB_BLUETOOTH = 'ContentWebBluetooth'
class-attribute
instance-attribute
CONTENT_WEB_USB = 'ContentWebUSB'
class-attribute
instance-attribute
COOKIE_DISABLED = 'CookieDisabled'
class-attribute
instance-attribute
COOKIE_FLUSHED = 'CookieFlushed'
class-attribute
instance-attribute
DISABLE_FOR_RENDER_FRAME_HOST_CALLED = 'DisableForRenderFrameHostCalled'
class-attribute
instance-attribute
DOCUMENT_LOADED = 'DocumentLoaded'
class-attribute
instance-attribute
DOMAIN_NOT_ALLOWED = 'DomainNotAllowed'
class-attribute
instance-attribute
DUMMY = 'Dummy'
class-attribute
instance-attribute
EMBEDDER_APP_BANNER_MANAGER = 'EmbedderAppBannerManager'
class-attribute
instance-attribute
EMBEDDER_CHROME_PASSWORD_MANAGER_CLIENT_BIND_CREDENTIAL_MANAGER = 'EmbedderChromePasswordManagerClientBindCredentialManager'
class-attribute
instance-attribute
EMBEDDER_DOM_DISTILLER_SELF_DELETING_REQUEST_DELEGATE = 'EmbedderDomDistillerSelfDeletingRequestDelegate'
class-attribute
instance-attribute
EMBEDDER_DOM_DISTILLER_VIEWER_SOURCE = 'EmbedderDomDistillerViewerSource'
class-attribute
instance-attribute
EMBEDDER_EXTENSIONS = 'EmbedderExtensions'
class-attribute
instance-attribute
EMBEDDER_EXTENSION_MESSAGING = 'EmbedderExtensionMessaging'
class-attribute
instance-attribute
EMBEDDER_EXTENSION_MESSAGING_FOR_OPEN_PORT = 'EmbedderExtensionMessagingForOpenPort'
class-attribute
instance-attribute
EMBEDDER_EXTENSION_SENT_MESSAGE_TO_CACHED_FRAME = 'EmbedderExtensionSentMessageToCachedFrame'
class-attribute
instance-attribute
EMBEDDER_MODAL_DIALOG = 'EmbedderModalDialog'
class-attribute
instance-attribute
EMBEDDER_OFFLINE_PAGE = 'EmbedderOfflinePage'
class-attribute
instance-attribute
EMBEDDER_OOM_INTERVENTION_TAB_HELPER = 'EmbedderOomInterventionTabHelper'
class-attribute
instance-attribute
EMBEDDER_PERMISSION_REQUEST_MANAGER = 'EmbedderPermissionRequestManager'
class-attribute
instance-attribute
EMBEDDER_POPUP_BLOCKER_TAB_HELPER = 'EmbedderPopupBlockerTabHelper'
class-attribute
instance-attribute
EMBEDDER_SAFE_BROWSING_THREAT_DETAILS = 'EmbedderSafeBrowsingThreatDetails'
class-attribute
instance-attribute
EMBEDDER_SAFE_BROWSING_TRIGGERED_POPUP_BLOCKER = 'EmbedderSafeBrowsingTriggeredPopupBlocker'
class-attribute
instance-attribute
ENTERED_BACK_FORWARD_CACHE_BEFORE_SERVICE_WORKER_HOST_ADDED = 'EnteredBackForwardCacheBeforeServiceWorkerHostAdded'
class-attribute
instance-attribute
ERROR_DOCUMENT = 'ErrorDocument'
class-attribute
instance-attribute
FENCED_FRAMES_EMBEDDER = 'FencedFramesEmbedder'
class-attribute
instance-attribute
FOREGROUND_CACHE_LIMIT = 'ForegroundCacheLimit'
class-attribute
instance-attribute
HAVE_INNER_CONTENTS = 'HaveInnerContents'
class-attribute
instance-attribute
HTTP_AUTH_REQUIRED = 'HTTPAuthRequired'
class-attribute
instance-attribute
HTTP_METHOD_NOT_GET = 'HTTPMethodNotGET'
class-attribute
instance-attribute
HTTP_STATUS_NOT_OK = 'HTTPStatusNotOK'
class-attribute
instance-attribute
IDLE_MANAGER = 'IdleManager'
class-attribute
instance-attribute
IGNORE_EVENT_AND_EVICT = 'IgnoreEventAndEvict'
class-attribute
instance-attribute
INDEXED_DB_EVENT = 'IndexedDBEvent'
class-attribute
instance-attribute
INJECTED_JAVASCRIPT = 'InjectedJavascript'
class-attribute
instance-attribute
INJECTED_STYLE_SHEET = 'InjectedStyleSheet'
class-attribute
instance-attribute
JAVA_SCRIPT_EXECUTION = 'JavaScriptExecution'
class-attribute
instance-attribute
JS_NETWORK_REQUEST_RECEIVED_CACHE_CONTROL_NO_STORE_RESOURCE = 'JsNetworkRequestReceivedCacheControlNoStoreResource'
class-attribute
instance-attribute
KEEPALIVE_REQUEST = 'KeepaliveRequest'
class-attribute
instance-attribute
KEYBOARD_LOCK = 'KeyboardLock'
class-attribute
instance-attribute
LIVE_MEDIA_STREAM_TRACK = 'LiveMediaStreamTrack'
class-attribute
instance-attribute
LOADING = 'Loading'
class-attribute
instance-attribute
MAIN_RESOURCE_HAS_CACHE_CONTROL_NO_CACHE = 'MainResourceHasCacheControlNoCache'
class-attribute
instance-attribute
MAIN_RESOURCE_HAS_CACHE_CONTROL_NO_STORE = 'MainResourceHasCacheControlNoStore'
class-attribute
instance-attribute
NAVIGATION_CANCELLED_WHILE_RESTORING = 'NavigationCancelledWhileRestoring'
class-attribute
instance-attribute
NETWORK_EXCEEDS_BUFFER_LIMIT = 'NetworkExceedsBufferLimit'
class-attribute
instance-attribute
NETWORK_REQUEST_DATAPIPE_DRAINED_AS_BYTES_CONSUMER = 'NetworkRequestDatapipeDrainedAsBytesConsumer'
class-attribute
instance-attribute
NETWORK_REQUEST_REDIRECTED = 'NetworkRequestRedirected'
class-attribute
instance-attribute
NETWORK_REQUEST_TIMEOUT = 'NetworkRequestTimeout'
class-attribute
instance-attribute
NOT_MOST_RECENT_NAVIGATION_ENTRY = 'NotMostRecentNavigationEntry'
class-attribute
instance-attribute
NOT_PRIMARY_MAIN_FRAME = 'NotPrimaryMainFrame'
class-attribute
instance-attribute
NO_RESPONSE_HEAD = 'NoResponseHead'
class-attribute
instance-attribute
OUTSTANDING_NETWORK_REQUEST_DIRECT_SOCKET = 'OutstandingNetworkRequestDirectSocket'
class-attribute
instance-attribute
OUTSTANDING_NETWORK_REQUEST_FETCH = 'OutstandingNetworkRequestFetch'
class-attribute
instance-attribute
OUTSTANDING_NETWORK_REQUEST_OTHERS = 'OutstandingNetworkRequestOthers'
class-attribute
instance-attribute
OUTSTANDING_NETWORK_REQUEST_XHR = 'OutstandingNetworkRequestXHR'
class-attribute
instance-attribute
PARSER_ABORTED = 'ParserAborted'
class-attribute
instance-attribute
PAYMENT_MANAGER = 'PaymentManager'
class-attribute
instance-attribute
PICTURE_IN_PICTURE = 'PictureInPicture'
class-attribute
instance-attribute
POST_MESSAGE_BY_WEB_VIEW_CLIENT = 'PostMessageByWebViewClient'
class-attribute
instance-attribute
PRINTING = 'Printing'
class-attribute
instance-attribute
RELATED_ACTIVE_CONTENTS_EXIST = 'RelatedActiveContentsExist'
class-attribute
instance-attribute
RENDERER_PROCESS_CRASHED = 'RendererProcessCrashed'
class-attribute
instance-attribute
RENDERER_PROCESS_KILLED = 'RendererProcessKilled'
class-attribute
instance-attribute
RENDER_FRAME_HOST_REUSED_CROSS_SITE = 'RenderFrameHostReused_CrossSite'
class-attribute
instance-attribute
RENDER_FRAME_HOST_REUSED_SAME_SITE = 'RenderFrameHostReused_SameSite'
class-attribute
instance-attribute
REQUESTED_AUDIO_CAPTURE_PERMISSION = 'RequestedAudioCapturePermission'
class-attribute
instance-attribute
REQUESTED_BACKGROUND_WORK_PERMISSION = 'RequestedBackgroundWorkPermission'
class-attribute
instance-attribute
REQUESTED_BACK_FORWARD_CACHE_BLOCKED_SENSORS = 'RequestedBackForwardCacheBlockedSensors'
class-attribute
instance-attribute
REQUESTED_BY_WEB_VIEW_CLIENT = 'RequestedByWebViewClient'
class-attribute
instance-attribute
REQUESTED_MIDI_PERMISSION = 'RequestedMIDIPermission'
class-attribute
instance-attribute
REQUESTED_STORAGE_ACCESS_GRANT = 'RequestedStorageAccessGrant'
class-attribute
instance-attribute
REQUESTED_VIDEO_CAPTURE_PERMISSION = 'RequestedVideoCapturePermission'
class-attribute
instance-attribute
SCHEDULER_TRACKED_FEATURE_USED = 'SchedulerTrackedFeatureUsed'
class-attribute
instance-attribute
SCHEME_NOT_HTTP_OR_HTTPS = 'SchemeNotHTTPOrHTTPS'
class-attribute
instance-attribute
SERVICE_WORKER_CLAIM = 'ServiceWorkerClaim'
class-attribute
instance-attribute
SERVICE_WORKER_POST_MESSAGE = 'ServiceWorkerPostMessage'
class-attribute
instance-attribute
SERVICE_WORKER_UNREGISTRATION = 'ServiceWorkerUnregistration'
class-attribute
instance-attribute
SERVICE_WORKER_VERSION_ACTIVATION = 'ServiceWorkerVersionActivation'
class-attribute
instance-attribute
SESSION_RESTORED = 'SessionRestored'
class-attribute
instance-attribute
SHARED_WORKER = 'SharedWorker'
class-attribute
instance-attribute
SMART_CARD = 'SmartCard'
class-attribute
instance-attribute
SPEECH_RECOGNIZER = 'SpeechRecognizer'
class-attribute
instance-attribute
SPEECH_SYNTHESIS = 'SpeechSynthesis'
class-attribute
instance-attribute
SUBFRAME_IS_NAVIGATING = 'SubframeIsNavigating'
class-attribute
instance-attribute
SUBRESOURCE_HAS_CACHE_CONTROL_NO_CACHE = 'SubresourceHasCacheControlNoCache'
class-attribute
instance-attribute
SUBRESOURCE_HAS_CACHE_CONTROL_NO_STORE = 'SubresourceHasCacheControlNoStore'
class-attribute
instance-attribute
TIMEOUT = 'Timeout'
class-attribute
instance-attribute
TIMEOUT_PUTTING_IN_CACHE = 'TimeoutPuttingInCache'
class-attribute
instance-attribute
UNKNOWN = 'Unknown'
class-attribute
instance-attribute
UNLOAD_HANDLER = 'UnloadHandler'
class-attribute
instance-attribute
UNLOAD_HANDLER_EXISTS_IN_MAIN_FRAME = 'UnloadHandlerExistsInMainFrame'
class-attribute
instance-attribute
UNLOAD_HANDLER_EXISTS_IN_SUB_FRAME = 'UnloadHandlerExistsInSubFrame'
class-attribute
instance-attribute
USER_AGENT_OVERRIDE_DIFFERS = 'UserAgentOverrideDiffers'
class-attribute
instance-attribute
WAS_GRANTED_MEDIA_ACCESS = 'WasGrantedMediaAccess'
class-attribute
instance-attribute
WEB_DATABASE = 'WebDatabase'
class-attribute
instance-attribute
WEB_HID = 'WebHID'
class-attribute
instance-attribute
WEB_LOCKS = 'WebLocks'
class-attribute
instance-attribute
WEB_NFC = 'WebNfc'
class-attribute
instance-attribute
WEB_OTP_SERVICE = 'WebOTPService'
class-attribute
instance-attribute
WEB_RTC = 'WebRTC'
class-attribute
instance-attribute
WEB_RTC_STICKY = 'WebRTCSticky'
class-attribute
instance-attribute
WEB_SHARE = 'WebShare'
class-attribute
instance-attribute
WEB_SOCKET = 'WebSocket'
class-attribute
instance-attribute
WEB_SOCKET_STICKY = 'WebSocketSticky'
class-attribute
instance-attribute
WEB_TRANSPORT = 'WebTransport'
class-attribute
instance-attribute
WEB_TRANSPORT_STICKY = 'WebTransportSticky'
class-attribute
instance-attribute
WEB_VIEW_DOCUMENT_START_JAVASCRIPT_CHANGED = 'WebViewDocumentStartJavascriptChanged'
class-attribute
instance-attribute
WEB_VIEW_JAVA_SCRIPT_OBJECT_CHANGED = 'WebViewJavaScriptObjectChanged'
class-attribute
instance-attribute
WEB_VIEW_MESSAGE_LISTENER_INJECTED = 'WebViewMessageListenerInjected'
class-attribute
instance-attribute
WEB_VIEW_SAFE_BROWSING_ALLOWLIST_CHANGED = 'WebViewSafeBrowsingAllowlistChanged'
class-attribute
instance-attribute
WEB_VIEW_SETTINGS_CHANGED = 'WebViewSettingsChanged'
class-attribute
instance-attribute
WEB_XR = 'WebXR'
class-attribute
instance-attribute
from_json(json)
classmethod
BackForwardCacheNotRestoredReasonType
Bases: Enum
Types of not restored reasons for back-forward cache.
Source code in zendriver/cdp/page.py
CIRCUMSTANTIAL = 'Circumstantial'
class-attribute
instance-attribute
PAGE_SUPPORT_NEEDED = 'PageSupportNeeded'
class-attribute
instance-attribute
SUPPORT_PENDING = 'SupportPending'
class-attribute
instance-attribute
from_json(json)
classmethod
BackForwardCacheNotUsed
dataclass
EXPERIMENTAL
Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
loader_id: network.LoaderId
instance-attribute
not_restored_explanations: typing.List[BackForwardCacheNotRestoredExplanation]
instance-attribute
not_restored_explanations_tree: typing.Optional[BackForwardCacheNotRestoredExplanationTree]
instance-attribute
__init__(loader_id, frame_id, not_restored_explanations, not_restored_explanations_tree)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
ClientNavigationDisposition
Bases: Enum
Source code in zendriver/cdp/page.py
CURRENT_TAB = 'currentTab'
class-attribute
instance-attribute
DOWNLOAD = 'download'
class-attribute
instance-attribute
NEW_TAB = 'newTab'
class-attribute
instance-attribute
NEW_WINDOW = 'newWindow'
class-attribute
instance-attribute
from_json(json)
classmethod
ClientNavigationReason
Bases: Enum
Source code in zendriver/cdp/page.py
ANCHOR_CLICK = 'anchorClick'
class-attribute
instance-attribute
FORM_SUBMISSION_GET = 'formSubmissionGet'
class-attribute
instance-attribute
FORM_SUBMISSION_POST = 'formSubmissionPost'
class-attribute
instance-attribute
HTTP_HEADER_REFRESH = 'httpHeaderRefresh'
class-attribute
instance-attribute
INITIAL_FRAME_NAVIGATION = 'initialFrameNavigation'
class-attribute
instance-attribute
META_TAG_REFRESH = 'metaTagRefresh'
class-attribute
instance-attribute
OTHER = 'other'
class-attribute
instance-attribute
PAGE_BLOCK_INTERSTITIAL = 'pageBlockInterstitial'
class-attribute
instance-attribute
RELOAD = 'reload'
class-attribute
instance-attribute
SCRIPT_INITIATED = 'scriptInitiated'
class-attribute
instance-attribute
from_json(json)
classmethod
CompilationCacheParams
dataclass
Per-script compilation cache parameters for Page.produceCompilationCache
Source code in zendriver/cdp/page.py
eager: typing.Optional[bool] = None
class-attribute
instance-attribute
url: str
instance-attribute
__init__(url, eager=None)
from_json(json)
classmethod
CompilationCacheProduced
dataclass
EXPERIMENTAL
Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.
Source code in zendriver/cdp/page.py
CrossOriginIsolatedContextType
Bases: Enum
Indicates whether the frame is cross-origin isolated and why it is the case.
Source code in zendriver/cdp/page.py
ISOLATED = 'Isolated'
class-attribute
instance-attribute
NOT_ISOLATED = 'NotIsolated'
class-attribute
instance-attribute
NOT_ISOLATED_FEATURE_DISABLED = 'NotIsolatedFeatureDisabled'
class-attribute
instance-attribute
from_json(json)
classmethod
DialogType
Bases: Enum
Javascript dialog type.
Source code in zendriver/cdp/page.py
ALERT = 'alert'
class-attribute
instance-attribute
BEFOREUNLOAD = 'beforeunload'
class-attribute
instance-attribute
CONFIRM = 'confirm'
class-attribute
instance-attribute
PROMPT = 'prompt'
class-attribute
instance-attribute
from_json(json)
classmethod
DocumentOpened
dataclass
EXPERIMENTAL
Fired when opening document to write to.
Source code in zendriver/cdp/page.py
DomContentEventFired
dataclass
Source code in zendriver/cdp/page.py
DownloadProgress
dataclass
EXPERIMENTAL
Fired when download makes progress. Last call has done
== true.
Deprecated. Use Browser.downloadProgress instead.
Source code in zendriver/cdp/page.py
guid: str
instance-attribute
received_bytes: float
instance-attribute
state: str
instance-attribute
total_bytes: float
instance-attribute
__init__(guid, total_bytes, received_bytes, state)
from_json(json)
classmethod
DownloadWillBegin
dataclass
EXPERIMENTAL
Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
guid: str
instance-attribute
suggested_filename: str
instance-attribute
url: str
instance-attribute
__init__(frame_id, guid, url, suggested_filename)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FileChooserOpened
dataclass
Emitted only when page.interceptFileChooser
is enabled.
Source code in zendriver/cdp/page.py
backend_node_id: typing.Optional[dom.BackendNodeId]
instance-attribute
frame_id: FrameId
instance-attribute
mode: str
instance-attribute
__init__(frame_id, mode, backend_node_id)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FileFilter
dataclass
Source code in zendriver/cdp/page.py
accepts: typing.Optional[typing.List[str]] = None
class-attribute
instance-attribute
name: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(name=None, accepts=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FileHandler
dataclass
Source code in zendriver/cdp/page.py
accepts: typing.Optional[typing.List[FileFilter]] = None
class-attribute
instance-attribute
action: str
instance-attribute
icons: typing.Optional[typing.List[ImageResource]] = None
class-attribute
instance-attribute
launch_type: str
instance-attribute
name: str
instance-attribute
__init__(action, name, launch_type, icons=None, accepts=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
FontFamilies
dataclass
Generic font families collection.
Source code in zendriver/cdp/page.py
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 |
|
cursive: typing.Optional[str] = None
class-attribute
instance-attribute
fantasy: typing.Optional[str] = None
class-attribute
instance-attribute
fixed: typing.Optional[str] = None
class-attribute
instance-attribute
math: typing.Optional[str] = None
class-attribute
instance-attribute
sans_serif: typing.Optional[str] = None
class-attribute
instance-attribute
serif: typing.Optional[str] = None
class-attribute
instance-attribute
standard: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(standard=None, fixed=None, serif=None, sans_serif=None, cursive=None, fantasy=None, math=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
FontSizes
dataclass
Default font sizes.
Source code in zendriver/cdp/page.py
fixed: typing.Optional[int] = None
class-attribute
instance-attribute
standard: typing.Optional[int] = None
class-attribute
instance-attribute
__init__(standard=None, fixed=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
Frame
dataclass
Information about the Frame on the page.
Source code in zendriver/cdp/page.py
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
|
ad_frame_status: typing.Optional[AdFrameStatus] = None
class-attribute
instance-attribute
cross_origin_isolated_context_type: CrossOriginIsolatedContextType
instance-attribute
domain_and_registry: str
instance-attribute
gated_api_features: typing.List[GatedAPIFeatures]
instance-attribute
id_: FrameId
instance-attribute
loader_id: network.LoaderId
instance-attribute
mime_type: str
instance-attribute
name: typing.Optional[str] = None
class-attribute
instance-attribute
parent_id: typing.Optional[FrameId] = None
class-attribute
instance-attribute
secure_context_type: SecureContextType
instance-attribute
security_origin: str
instance-attribute
unreachable_url: typing.Optional[str] = None
class-attribute
instance-attribute
url: str
instance-attribute
url_fragment: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(id_, loader_id, url, domain_and_registry, security_origin, mime_type, secure_context_type, cross_origin_isolated_context_type, gated_api_features, parent_id=None, name=None, url_fragment=None, unreachable_url=None, ad_frame_status=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
FrameAttached
dataclass
Fired when frame has been attached to its parent.
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
parent_frame_id: FrameId
instance-attribute
stack: typing.Optional[runtime.StackTrace]
instance-attribute
__init__(frame_id, parent_frame_id, stack)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FrameClearedScheduledNavigation
dataclass
Fired when frame no longer has a scheduled navigation.
Source code in zendriver/cdp/page.py
FrameDetached
dataclass
Fired when frame has been detached from its parent.
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
reason: str
instance-attribute
__init__(frame_id, reason)
FrameId
Bases: str
Unique frame identifier.
Source code in zendriver/cdp/page.py
__repr__()
from_json(json)
classmethod
FrameNavigated
dataclass
Fired once navigation of the frame has completed. Frame is now associated with the new loader.
Source code in zendriver/cdp/page.py
frame: Frame
instance-attribute
type_: NavigationType
instance-attribute
__init__(frame, type_)
FrameRequestedNavigation
dataclass
EXPERIMENTAL
Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
Source code in zendriver/cdp/page.py
disposition: ClientNavigationDisposition
instance-attribute
frame_id: FrameId
instance-attribute
reason: ClientNavigationReason
instance-attribute
url: str
instance-attribute
__init__(frame_id, reason, url, disposition)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FrameResized
dataclass
EXPERIMENTAL
Source code in zendriver/cdp/page.py
FrameResource
dataclass
Information about the Resource on the page.
Source code in zendriver/cdp/page.py
canceled: typing.Optional[bool] = None
class-attribute
instance-attribute
content_size: typing.Optional[float] = None
class-attribute
instance-attribute
failed: typing.Optional[bool] = None
class-attribute
instance-attribute
last_modified: typing.Optional[network.TimeSinceEpoch] = None
class-attribute
instance-attribute
mime_type: str
instance-attribute
type_: network.ResourceType
instance-attribute
url: str
instance-attribute
__init__(url, type_, mime_type, last_modified=None, content_size=None, failed=None, canceled=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
FrameResourceTree
dataclass
Information about the Frame hierarchy along with their cached resources.
Source code in zendriver/cdp/page.py
child_frames: typing.Optional[typing.List[FrameResourceTree]] = None
class-attribute
instance-attribute
frame: Frame
instance-attribute
resources: typing.List[FrameResource]
instance-attribute
__init__(frame, resources, child_frames=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
FrameScheduledNavigation
dataclass
Fired when frame schedules a potential navigation.
Source code in zendriver/cdp/page.py
delay: float
instance-attribute
frame_id: FrameId
instance-attribute
reason: ClientNavigationReason
instance-attribute
url: str
instance-attribute
__init__(frame_id, delay, reason, url)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
FrameStartedLoading
dataclass
EXPERIMENTAL
Fired when frame has started loading.
Source code in zendriver/cdp/page.py
FrameStoppedLoading
dataclass
EXPERIMENTAL
Fired when frame has stopped loading.
Source code in zendriver/cdp/page.py
FrameSubtreeWillBeDetached
dataclass
EXPERIMENTAL
Fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
Source code in zendriver/cdp/page.py
FrameTree
dataclass
Information about the Frame hierarchy.
Source code in zendriver/cdp/page.py
child_frames: typing.Optional[typing.List[FrameTree]] = None
class-attribute
instance-attribute
frame: Frame
instance-attribute
__init__(frame, child_frames=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
GatedAPIFeatures
Bases: Enum
Source code in zendriver/cdp/page.py
PERFORMANCE_MEASURE_MEMORY = 'PerformanceMeasureMemory'
class-attribute
instance-attribute
PERFORMANCE_PROFILE = 'PerformanceProfile'
class-attribute
instance-attribute
SHARED_ARRAY_BUFFERS = 'SharedArrayBuffers'
class-attribute
instance-attribute
SHARED_ARRAY_BUFFERS_TRANSFER_ALLOWED = 'SharedArrayBuffersTransferAllowed'
class-attribute
instance-attribute
from_json(json)
classmethod
ImageResource
dataclass
The image definition used in both icon and screenshot.
Source code in zendriver/cdp/page.py
sizes: typing.Optional[str] = None
class-attribute
instance-attribute
type_: typing.Optional[str] = None
class-attribute
instance-attribute
url: str
instance-attribute
__init__(url, sizes=None, type_=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
InstallabilityError
dataclass
The installability error
Source code in zendriver/cdp/page.py
error_arguments: typing.List[InstallabilityErrorArgument]
instance-attribute
error_id: str
instance-attribute
__init__(error_id, error_arguments)
from_json(json)
classmethod
InstallabilityErrorArgument
dataclass
Source code in zendriver/cdp/page.py
name: str
instance-attribute
value: str
instance-attribute
__init__(name, value)
from_json(json)
classmethod
InterstitialHidden
dataclass
Fired when interstitial page was hidden
Source code in zendriver/cdp/page.py
InterstitialShown
dataclass
Fired when interstitial page was shown
Source code in zendriver/cdp/page.py
JavascriptDialogClosed
dataclass
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
Source code in zendriver/cdp/page.py
result: bool
instance-attribute
user_input: str
instance-attribute
__init__(result, user_input)
JavascriptDialogOpening
dataclass
Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
Source code in zendriver/cdp/page.py
default_prompt: typing.Optional[str]
instance-attribute
has_browser_handler: bool
instance-attribute
message: str
instance-attribute
type_: DialogType
instance-attribute
url: str
instance-attribute
__init__(url, message, type_, has_browser_handler, default_prompt)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
LaunchHandler
dataclass
Source code in zendriver/cdp/page.py
client_mode: str
instance-attribute
__init__(client_mode)
from_json(json)
classmethod
LayoutViewport
dataclass
Layout viewport position and dimensions.
Source code in zendriver/cdp/page.py
client_height: int
instance-attribute
client_width: int
instance-attribute
page_x: int
instance-attribute
page_y: int
instance-attribute
__init__(page_x, page_y, client_width, client_height)
from_json(json)
classmethod
LifecycleEvent
dataclass
Fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
loader_id: network.LoaderId
instance-attribute
name: str
instance-attribute
timestamp: network.MonotonicTime
instance-attribute
__init__(frame_id, loader_id, name, timestamp)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
LoadEventFired
dataclass
Source code in zendriver/cdp/page.py
NavigatedWithinDocument
dataclass
EXPERIMENTAL
Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
Source code in zendriver/cdp/page.py
frame_id: FrameId
instance-attribute
navigation_type: str
instance-attribute
url: str
instance-attribute
__init__(frame_id, url, navigation_type)
from_json(json)
classmethod
NavigationEntry
dataclass
Navigation history entry.
Source code in zendriver/cdp/page.py
id_: int
instance-attribute
title: str
instance-attribute
transition_type: TransitionType
instance-attribute
url: str
instance-attribute
user_typed_url: str
instance-attribute
__init__(id_, url, user_typed_url, title, transition_type)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
NavigationType
Bases: Enum
The type of a frameNavigated event.
Source code in zendriver/cdp/page.py
BACK_FORWARD_CACHE_RESTORE = 'BackForwardCacheRestore'
class-attribute
instance-attribute
NAVIGATION = 'Navigation'
class-attribute
instance-attribute
from_json(json)
classmethod
OriginTrial
dataclass
Source code in zendriver/cdp/page.py
status: OriginTrialStatus
instance-attribute
tokens_with_status: typing.List[OriginTrialTokenWithStatus]
instance-attribute
trial_name: str
instance-attribute
__init__(trial_name, status, tokens_with_status)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
OriginTrialStatus
Bases: Enum
Status for an Origin Trial.
Source code in zendriver/cdp/page.py
ENABLED = 'Enabled'
class-attribute
instance-attribute
OS_NOT_SUPPORTED = 'OSNotSupported'
class-attribute
instance-attribute
TRIAL_NOT_ALLOWED = 'TrialNotAllowed'
class-attribute
instance-attribute
VALID_TOKEN_NOT_PROVIDED = 'ValidTokenNotProvided'
class-attribute
instance-attribute
from_json(json)
classmethod
OriginTrialToken
dataclass
Source code in zendriver/cdp/page.py
expiry_time: network.TimeSinceEpoch
instance-attribute
is_third_party: bool
instance-attribute
match_sub_domains: bool
instance-attribute
origin: str
instance-attribute
trial_name: str
instance-attribute
usage_restriction: OriginTrialUsageRestriction
instance-attribute
__init__(origin, match_sub_domains, trial_name, expiry_time, is_third_party, usage_restriction)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
OriginTrialTokenStatus
Bases: Enum
Origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.
Source code in zendriver/cdp/page.py
EXPIRED = 'Expired'
class-attribute
instance-attribute
FEATURE_DISABLED = 'FeatureDisabled'
class-attribute
instance-attribute
FEATURE_DISABLED_FOR_USER = 'FeatureDisabledForUser'
class-attribute
instance-attribute
INSECURE = 'Insecure'
class-attribute
instance-attribute
INVALID_SIGNATURE = 'InvalidSignature'
class-attribute
instance-attribute
MALFORMED = 'Malformed'
class-attribute
instance-attribute
NOT_SUPPORTED = 'NotSupported'
class-attribute
instance-attribute
SUCCESS = 'Success'
class-attribute
instance-attribute
TOKEN_DISABLED = 'TokenDisabled'
class-attribute
instance-attribute
UNKNOWN_TRIAL = 'UnknownTrial'
class-attribute
instance-attribute
WRONG_ORIGIN = 'WrongOrigin'
class-attribute
instance-attribute
WRONG_VERSION = 'WrongVersion'
class-attribute
instance-attribute
from_json(json)
classmethod
OriginTrialTokenWithStatus
dataclass
Source code in zendriver/cdp/page.py
parsed_token: typing.Optional[OriginTrialToken] = None
class-attribute
instance-attribute
raw_token_text: str
instance-attribute
status: OriginTrialTokenStatus
instance-attribute
__init__(raw_token_text, status, parsed_token=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
OriginTrialUsageRestriction
Bases: Enum
Source code in zendriver/cdp/page.py
NONE = 'None'
class-attribute
instance-attribute
SUBSET = 'Subset'
class-attribute
instance-attribute
from_json(json)
classmethod
PermissionsPolicyBlockLocator
dataclass
Source code in zendriver/cdp/page.py
block_reason: PermissionsPolicyBlockReason
instance-attribute
frame_id: FrameId
instance-attribute
__init__(frame_id, block_reason)
from_json(json)
classmethod
PermissionsPolicyBlockReason
Bases: Enum
Reason for a permissions policy feature to be disabled.
Source code in zendriver/cdp/page.py
HEADER = 'Header'
class-attribute
instance-attribute
IFRAME_ATTRIBUTE = 'IframeAttribute'
class-attribute
instance-attribute
IN_FENCED_FRAME_TREE = 'InFencedFrameTree'
class-attribute
instance-attribute
IN_ISOLATED_APP = 'InIsolatedApp'
class-attribute
instance-attribute
from_json(json)
classmethod
PermissionsPolicyFeature
Bases: Enum
All Permissions Policy features. This enum should match the one defined in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.
Source code in zendriver/cdp/page.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
ACCELEROMETER = 'accelerometer'
class-attribute
instance-attribute
ALL_SCREENS_CAPTURE = 'all-screens-capture'
class-attribute
instance-attribute
AMBIENT_LIGHT_SENSOR = 'ambient-light-sensor'
class-attribute
instance-attribute
ATTRIBUTION_REPORTING = 'attribution-reporting'
class-attribute
instance-attribute
AUTOPLAY = 'autoplay'
class-attribute
instance-attribute
BLUETOOTH = 'bluetooth'
class-attribute
instance-attribute
BROWSING_TOPICS = 'browsing-topics'
class-attribute
instance-attribute
CAMERA = 'camera'
class-attribute
instance-attribute
CAPTURED_SURFACE_CONTROL = 'captured-surface-control'
class-attribute
instance-attribute
CH_DEVICE_MEMORY = 'ch-device-memory'
class-attribute
instance-attribute
CH_DOWNLINK = 'ch-downlink'
class-attribute
instance-attribute
CH_DPR = 'ch-dpr'
class-attribute
instance-attribute
CH_ECT = 'ch-ect'
class-attribute
instance-attribute
CH_PREFERS_COLOR_SCHEME = 'ch-prefers-color-scheme'
class-attribute
instance-attribute
CH_PREFERS_REDUCED_MOTION = 'ch-prefers-reduced-motion'
class-attribute
instance-attribute
CH_PREFERS_REDUCED_TRANSPARENCY = 'ch-prefers-reduced-transparency'
class-attribute
instance-attribute
CH_RTT = 'ch-rtt'
class-attribute
instance-attribute
CH_SAVE_DATA = 'ch-save-data'
class-attribute
instance-attribute
CH_UA = 'ch-ua'
class-attribute
instance-attribute
CH_UA_ARCH = 'ch-ua-arch'
class-attribute
instance-attribute
CH_UA_BITNESS = 'ch-ua-bitness'
class-attribute
instance-attribute
CH_UA_FORM_FACTORS = 'ch-ua-form-factors'
class-attribute
instance-attribute
CH_UA_FULL_VERSION = 'ch-ua-full-version'
class-attribute
instance-attribute
CH_UA_FULL_VERSION_LIST = 'ch-ua-full-version-list'
class-attribute
instance-attribute
CH_UA_MOBILE = 'ch-ua-mobile'
class-attribute
instance-attribute
CH_UA_MODEL = 'ch-ua-model'
class-attribute
instance-attribute
CH_UA_PLATFORM = 'ch-ua-platform'
class-attribute
instance-attribute
CH_UA_PLATFORM_VERSION = 'ch-ua-platform-version'
class-attribute
instance-attribute
CH_UA_WOW64 = 'ch-ua-wow64'
class-attribute
instance-attribute
CH_VIEWPORT_HEIGHT = 'ch-viewport-height'
class-attribute
instance-attribute
CH_VIEWPORT_WIDTH = 'ch-viewport-width'
class-attribute
instance-attribute
CH_WIDTH = 'ch-width'
class-attribute
instance-attribute
CLIPBOARD_READ = 'clipboard-read'
class-attribute
instance-attribute
CLIPBOARD_WRITE = 'clipboard-write'
class-attribute
instance-attribute
COMPUTE_PRESSURE = 'compute-pressure'
class-attribute
instance-attribute
CONTROLLED_FRAME = 'controlled-frame'
class-attribute
instance-attribute
CROSS_ORIGIN_ISOLATED = 'cross-origin-isolated'
class-attribute
instance-attribute
DEFERRED_FETCH = 'deferred-fetch'
class-attribute
instance-attribute
DEFERRED_FETCH_MINIMAL = 'deferred-fetch-minimal'
class-attribute
instance-attribute
DIGITAL_CREDENTIALS_GET = 'digital-credentials-get'
class-attribute
instance-attribute
DIRECT_SOCKETS = 'direct-sockets'
class-attribute
instance-attribute
DIRECT_SOCKETS_PRIVATE = 'direct-sockets-private'
class-attribute
instance-attribute
DISPLAY_CAPTURE = 'display-capture'
class-attribute
instance-attribute
DOCUMENT_DOMAIN = 'document-domain'
class-attribute
instance-attribute
ENCRYPTED_MEDIA = 'encrypted-media'
class-attribute
instance-attribute
EXECUTION_WHILE_NOT_RENDERED = 'execution-while-not-rendered'
class-attribute
instance-attribute
EXECUTION_WHILE_OUT_OF_VIEWPORT = 'execution-while-out-of-viewport'
class-attribute
instance-attribute
FENCED_UNPARTITIONED_STORAGE_READ = 'fenced-unpartitioned-storage-read'
class-attribute
instance-attribute
FOCUS_WITHOUT_USER_ACTIVATION = 'focus-without-user-activation'
class-attribute
instance-attribute
FROBULATE = 'frobulate'
class-attribute
instance-attribute
FULLSCREEN = 'fullscreen'
class-attribute
instance-attribute
GAMEPAD = 'gamepad'
class-attribute
instance-attribute
GEOLOCATION = 'geolocation'
class-attribute
instance-attribute
GYROSCOPE = 'gyroscope'
class-attribute
instance-attribute
HID = 'hid'
class-attribute
instance-attribute
IDENTITY_CREDENTIALS_GET = 'identity-credentials-get'
class-attribute
instance-attribute
IDLE_DETECTION = 'idle-detection'
class-attribute
instance-attribute
INTEREST_COHORT = 'interest-cohort'
class-attribute
instance-attribute
JOIN_AD_INTEREST_GROUP = 'join-ad-interest-group'
class-attribute
instance-attribute
KEYBOARD_MAP = 'keyboard-map'
class-attribute
instance-attribute
LOCAL_FONTS = 'local-fonts'
class-attribute
instance-attribute
MAGNETOMETER = 'magnetometer'
class-attribute
instance-attribute
MEDIA_PLAYBACK_WHILE_NOT_VISIBLE = 'media-playback-while-not-visible'
class-attribute
instance-attribute
MICROPHONE = 'microphone'
class-attribute
instance-attribute
MIDI = 'midi'
class-attribute
instance-attribute
OTP_CREDENTIALS = 'otp-credentials'
class-attribute
instance-attribute
PAYMENT = 'payment'
class-attribute
instance-attribute
PICTURE_IN_PICTURE = 'picture-in-picture'
class-attribute
instance-attribute
POPINS = 'popins'
class-attribute
instance-attribute
PRIVATE_AGGREGATION = 'private-aggregation'
class-attribute
instance-attribute
PRIVATE_STATE_TOKEN_ISSUANCE = 'private-state-token-issuance'
class-attribute
instance-attribute
PRIVATE_STATE_TOKEN_REDEMPTION = 'private-state-token-redemption'
class-attribute
instance-attribute
PUBLICKEY_CREDENTIALS_CREATE = 'publickey-credentials-create'
class-attribute
instance-attribute
PUBLICKEY_CREDENTIALS_GET = 'publickey-credentials-get'
class-attribute
instance-attribute
RUN_AD_AUCTION = 'run-ad-auction'
class-attribute
instance-attribute
SCREEN_WAKE_LOCK = 'screen-wake-lock'
class-attribute
instance-attribute
SERIAL = 'serial'
class-attribute
instance-attribute
SHARED_AUTOFILL = 'shared-autofill'
class-attribute
instance-attribute
SHARED_STORAGE = 'shared-storage'
class-attribute
instance-attribute
SHARED_STORAGE_SELECT_URL = 'shared-storage-select-url'
class-attribute
instance-attribute
SMART_CARD = 'smart-card'
class-attribute
instance-attribute
SPEAKER_SELECTION = 'speaker-selection'
class-attribute
instance-attribute
STORAGE_ACCESS = 'storage-access'
class-attribute
instance-attribute
SUB_APPS = 'sub-apps'
class-attribute
instance-attribute
SYNC_XHR = 'sync-xhr'
class-attribute
instance-attribute
UNLOAD = 'unload'
class-attribute
instance-attribute
USB = 'usb'
class-attribute
instance-attribute
USB_UNRESTRICTED = 'usb-unrestricted'
class-attribute
instance-attribute
VERTICAL_SCROLL = 'vertical-scroll'
class-attribute
instance-attribute
WEB_APP_INSTALLATION = 'web-app-installation'
class-attribute
instance-attribute
WEB_PRINTING = 'web-printing'
class-attribute
instance-attribute
WEB_SHARE = 'web-share'
class-attribute
instance-attribute
WINDOW_MANAGEMENT = 'window-management'
class-attribute
instance-attribute
XR_SPATIAL_TRACKING = 'xr-spatial-tracking'
class-attribute
instance-attribute
from_json(json)
classmethod
PermissionsPolicyFeatureState
dataclass
Source code in zendriver/cdp/page.py
allowed: bool
instance-attribute
feature: PermissionsPolicyFeature
instance-attribute
locator: typing.Optional[PermissionsPolicyBlockLocator] = None
class-attribute
instance-attribute
__init__(feature, allowed, locator=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
ProtocolHandler
dataclass
Source code in zendriver/cdp/page.py
protocol: str
instance-attribute
url: str
instance-attribute
__init__(protocol, url)
from_json(json)
classmethod
ReferrerPolicy
Bases: Enum
The referring-policy used for the navigation.
Source code in zendriver/cdp/page.py
NO_REFERRER = 'noReferrer'
class-attribute
instance-attribute
NO_REFERRER_WHEN_DOWNGRADE = 'noReferrerWhenDowngrade'
class-attribute
instance-attribute
ORIGIN = 'origin'
class-attribute
instance-attribute
ORIGIN_WHEN_CROSS_ORIGIN = 'originWhenCrossOrigin'
class-attribute
instance-attribute
SAME_ORIGIN = 'sameOrigin'
class-attribute
instance-attribute
STRICT_ORIGIN = 'strictOrigin'
class-attribute
instance-attribute
STRICT_ORIGIN_WHEN_CROSS_ORIGIN = 'strictOriginWhenCrossOrigin'
class-attribute
instance-attribute
UNSAFE_URL = 'unsafeUrl'
class-attribute
instance-attribute
from_json(json)
classmethod
RelatedApplication
dataclass
Source code in zendriver/cdp/page.py
id_: typing.Optional[str] = None
class-attribute
instance-attribute
url: str
instance-attribute
__init__(url, id_=None)
from_json(json)
classmethod
ScopeExtension
dataclass
Source code in zendriver/cdp/page.py
has_origin_wildcard: bool
instance-attribute
origin: str
instance-attribute
__init__(origin, has_origin_wildcard)
from_json(json)
classmethod
ScreencastFrame
dataclass
EXPERIMENTAL
Compressed image data requested by the startScreencast
.
Source code in zendriver/cdp/page.py
data: str
instance-attribute
metadata: ScreencastFrameMetadata
instance-attribute
session_id: int
instance-attribute
__init__(data, metadata, session_id)
from_json(json)
classmethod
ScreencastFrameMetadata
dataclass
Screencast frame metadata.
Source code in zendriver/cdp/page.py
device_height: float
instance-attribute
device_width: float
instance-attribute
offset_top: float
instance-attribute
page_scale_factor: float
instance-attribute
scroll_offset_x: float
instance-attribute
scroll_offset_y: float
instance-attribute
timestamp: typing.Optional[network.TimeSinceEpoch] = None
class-attribute
instance-attribute
__init__(offset_top, page_scale_factor, device_width, device_height, scroll_offset_x, scroll_offset_y, timestamp=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
ScreencastVisibilityChanged
dataclass
EXPERIMENTAL
Fired when the page with currently enabled screencast was shown or hidden .
Source code in zendriver/cdp/page.py
Screenshot
dataclass
Source code in zendriver/cdp/page.py
form_factor: str
instance-attribute
image: ImageResource
instance-attribute
label: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(image, form_factor, label=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
ScriptFontFamilies
dataclass
Font families collection for a script.
Source code in zendriver/cdp/page.py
font_families: FontFamilies
instance-attribute
script: str
instance-attribute
__init__(script, font_families)
from_json(json)
classmethod
ScriptIdentifier
Bases: str
Unique script identifier.
Source code in zendriver/cdp/page.py
__repr__()
from_json(json)
classmethod
SecureContextType
Bases: Enum
Indicates whether the frame is a secure context and why it is the case.
Source code in zendriver/cdp/page.py
INSECURE_ANCESTOR = 'InsecureAncestor'
class-attribute
instance-attribute
INSECURE_SCHEME = 'InsecureScheme'
class-attribute
instance-attribute
SECURE = 'Secure'
class-attribute
instance-attribute
SECURE_LOCALHOST = 'SecureLocalhost'
class-attribute
instance-attribute
from_json(json)
classmethod
ShareTarget
dataclass
Source code in zendriver/cdp/page.py
action: str
instance-attribute
enctype: str
instance-attribute
files: typing.Optional[typing.List[FileFilter]] = None
class-attribute
instance-attribute
method: str
instance-attribute
text: typing.Optional[str] = None
class-attribute
instance-attribute
title: typing.Optional[str] = None
class-attribute
instance-attribute
url: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(action, method, enctype, title=None, text=None, url=None, files=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
Shortcut
dataclass
Source code in zendriver/cdp/page.py
name: str
instance-attribute
url: str
instance-attribute
__init__(name, url)
from_json(json)
classmethod
TransitionType
Bases: Enum
Transition type.
Source code in zendriver/cdp/page.py
ADDRESS_BAR = 'address_bar'
class-attribute
instance-attribute
AUTO_BOOKMARK = 'auto_bookmark'
class-attribute
instance-attribute
AUTO_SUBFRAME = 'auto_subframe'
class-attribute
instance-attribute
AUTO_TOPLEVEL = 'auto_toplevel'
class-attribute
instance-attribute
FORM_SUBMIT = 'form_submit'
class-attribute
instance-attribute
GENERATED = 'generated'
class-attribute
instance-attribute
KEYWORD = 'keyword'
class-attribute
instance-attribute
KEYWORD_GENERATED = 'keyword_generated'
class-attribute
instance-attribute
LINK = 'link'
class-attribute
instance-attribute
MANUAL_SUBFRAME = 'manual_subframe'
class-attribute
instance-attribute
OTHER = 'other'
class-attribute
instance-attribute
RELOAD = 'reload'
class-attribute
instance-attribute
TYPED = 'typed'
class-attribute
instance-attribute
from_json(json)
classmethod
Viewport
dataclass
Viewport for capturing screenshot.
Source code in zendriver/cdp/page.py
height: float
instance-attribute
scale: float
instance-attribute
width: float
instance-attribute
x: float
instance-attribute
y: float
instance-attribute
__init__(x, y, width, height, scale)
from_json(json)
classmethod
VisualViewport
dataclass
Visual viewport position, dimensions, and scale.
Source code in zendriver/cdp/page.py
client_height: float
instance-attribute
client_width: float
instance-attribute
offset_x: float
instance-attribute
offset_y: float
instance-attribute
page_x: float
instance-attribute
page_y: float
instance-attribute
scale: float
instance-attribute
zoom: typing.Optional[float] = None
class-attribute
instance-attribute
__init__(offset_x, offset_y, page_x, page_y, client_width, client_height, scale, zoom=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
to_json()
Source code in zendriver/cdp/page.py
WebAppManifest
dataclass
Source code in zendriver/cdp/page.py
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 |
|
background_color: typing.Optional[str] = None
class-attribute
instance-attribute
description: typing.Optional[str] = None
class-attribute
instance-attribute
dir_: typing.Optional[str] = None
class-attribute
instance-attribute
display: typing.Optional[str] = None
class-attribute
instance-attribute
display_overrides: typing.Optional[typing.List[str]] = None
class-attribute
instance-attribute
file_handlers: typing.Optional[typing.List[FileHandler]] = None
class-attribute
instance-attribute
icons: typing.Optional[typing.List[ImageResource]] = None
class-attribute
instance-attribute
id_: typing.Optional[str] = None
class-attribute
instance-attribute
lang: typing.Optional[str] = None
class-attribute
instance-attribute
launch_handler: typing.Optional[LaunchHandler] = None
class-attribute
instance-attribute
name: typing.Optional[str] = None
class-attribute
instance-attribute
orientation: typing.Optional[str] = None
class-attribute
instance-attribute
prefer_related_applications: typing.Optional[bool] = None
class-attribute
instance-attribute
protocol_handlers: typing.Optional[typing.List[ProtocolHandler]] = None
class-attribute
instance-attribute
related_applications: typing.Optional[typing.List[RelatedApplication]] = None
class-attribute
instance-attribute
scope: typing.Optional[str] = None
class-attribute
instance-attribute
scope_extensions: typing.Optional[typing.List[ScopeExtension]] = None
class-attribute
instance-attribute
screenshots: typing.Optional[typing.List[Screenshot]] = None
class-attribute
instance-attribute
share_target: typing.Optional[ShareTarget] = None
class-attribute
instance-attribute
short_name: typing.Optional[str] = None
class-attribute
instance-attribute
shortcuts: typing.Optional[typing.List[Shortcut]] = None
class-attribute
instance-attribute
start_url: typing.Optional[str] = None
class-attribute
instance-attribute
theme_color: typing.Optional[str] = None
class-attribute
instance-attribute
__init__(background_color=None, description=None, dir_=None, display=None, display_overrides=None, file_handlers=None, icons=None, id_=None, lang=None, launch_handler=None, name=None, orientation=None, prefer_related_applications=None, protocol_handlers=None, related_applications=None, scope=None, scope_extensions=None, screenshots=None, share_target=None, short_name=None, shortcuts=None, start_url=None, theme_color=None)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 |
|
to_json()
Source code in zendriver/cdp/page.py
WindowOpen
dataclass
Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
Source code in zendriver/cdp/page.py
url: str
instance-attribute
user_gesture: bool
instance-attribute
window_features: typing.List[str]
instance-attribute
window_name: str
instance-attribute
__init__(url, window_name, window_features, user_gesture)
from_json(json)
classmethod
Source code in zendriver/cdp/page.py
add_compilation_cache(url, data)
Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
|
required |
data
|
str
|
Base64-encoded data (Encoded as a base64 string when passed over JSON) |
required |
Source code in zendriver/cdp/page.py
add_script_to_evaluate_on_load(script_source)
Deprecated, please use addScriptToEvaluateOnNewDocument instead.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
script_source
|
str
|
|
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, ScriptIdentifier]
|
Identifier of the added script. |
Source code in zendriver/cdp/page.py
add_script_to_evaluate_on_new_document(source, world_name=None, include_command_line_api=None, run_immediately=None)
Evaluates given script in every frame upon creation (before loading frame's scripts).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
str
|
|
required |
world_name
|
Optional[str]
|
(EXPERIMENTAL) (Optional) If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted. |
None
|
include_command_line_api
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Specifies whether command line API should be available to the script, defaults to false. |
None
|
run_immediately
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) If true, runs the script immediately on existing execution contexts or worlds. Default: false. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, ScriptIdentifier]
|
Identifier of the added script. |
Source code in zendriver/cdp/page.py
bring_to_front()
Brings page to front (activates tab).
capture_screenshot(format_=None, quality=None, clip=None, from_surface=None, capture_beyond_viewport=None, optimize_for_speed=None)
Capture page screenshot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
format_
|
Optional[str]
|
(Optional) Image compression format (defaults to png). |
None
|
quality
|
Optional[int]
|
(Optional) Compression quality from range [0..100] (jpeg only). |
None
|
clip
|
Optional[Viewport]
|
(Optional) Capture the screenshot of a given region only. |
None
|
from_surface
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Capture the screenshot from the surface, rather than the view. Defaults to true. |
None
|
capture_beyond_viewport
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Capture the screenshot beyond the viewport. Defaults to false. |
None
|
optimize_for_speed
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Optimize image encoding for speed, not for resulting size (defaults to false) |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, str]
|
Base64-encoded image data. (Encoded as a base64 string when passed over JSON) |
Source code in zendriver/cdp/page.py
capture_snapshot(format_=None)
Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
format_
|
Optional[str]
|
(Optional) Format (defaults to mhtml). |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, str]
|
Serialized page data. |
Source code in zendriver/cdp/page.py
clear_compilation_cache()
Clears seeded compilation cache.
EXPERIMENTAL
Source code in zendriver/cdp/page.py
clear_device_metrics_override()
Clears the overridden device metrics.
.. deprecated:: 1.3
EXPERIMENTAL
Source code in zendriver/cdp/page.py
clear_device_orientation_override()
Clears the overridden Device Orientation.
.. deprecated:: 1.3
EXPERIMENTAL
Source code in zendriver/cdp/page.py
clear_geolocation_override()
Clears the overridden Geolocation Position and Error.
.. deprecated:: 1.3
Source code in zendriver/cdp/page.py
close()
Tries to close page, running its beforeunload hooks, if any.
crash()
Crashes renderer on the IO thread, generates minidumps.
EXPERIMENTAL
Source code in zendriver/cdp/page.py
create_isolated_world(frame_id, world_name=None, grant_univeral_access=None)
Creates an isolated world for the given frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
Id of the frame in which the isolated world should be created. |
required |
world_name
|
Optional[str]
|
(Optional) An optional name which is reported in the Execution Context. |
None
|
grant_univeral_access
|
Optional[bool]
|
(Optional) Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, ExecutionContextId]
|
Execution context of the isolated world. |
Source code in zendriver/cdp/page.py
delete_cookie(cookie_name, url)
Deletes browser cookie with given name, domain and path.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cookie_name
|
str
|
Name of the cookie to remove. |
required |
url
|
str
|
URL to match cooke domain and path. |
required |
Source code in zendriver/cdp/page.py
disable()
enable()
generate_test_report(message, group=None)
Generates a report for testing.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
str
|
Message to be displayed in the report. |
required |
group
|
Optional[str]
|
(Optional) Specifies the endpoint group to deliver the report to. |
None
|
Source code in zendriver/cdp/page.py
get_ad_script_id(frame_id)
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
|
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Optional[AdScriptId]]
|
(Optional) Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available. |
Source code in zendriver/cdp/page.py
get_app_id()
Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled
EXPERIMENTAL
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[Optional[str], Optional[str]]]
|
A tuple with the following items: 0. appId - (Optional) App id, either from manifest's id attribute or computed from start_url 1. recommendedId - (Optional) Recommendation for manifest's id attribute to match current id computed from start_url |
Source code in zendriver/cdp/page.py
get_app_manifest(manifest_id=None)
Gets the processed manifest for this current document. This API always waits for the manifest to be loaded. If manifestId is provided, and it does not match the manifest of the current document, this API errors out. If there is not a loaded page, this API errors out immediately.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
manifest_id
|
Optional[str]
|
(Optional) |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[str, List[AppManifestError], Optional[str], Optional[AppManifestParsedProperties], WebAppManifest]]
|
A tuple with the following items: 0. url - Manifest location. 1. errors - 2. data - (Optional) Manifest content. 3. parsed - (Optional) Parsed manifest properties. Deprecated, use manifest instead. 4. manifest - |
Source code in zendriver/cdp/page.py
get_frame_tree()
Returns present frame tree structure.
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, FrameTree]
|
Present frame tree structure. |
Source code in zendriver/cdp/page.py
get_installability_errors()
EXPERIMENTAL
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[InstallabilityError]]
|
|
Source code in zendriver/cdp/page.py
get_layout_metrics()
Returns metrics relating to the layouting of the page, such as viewport bounds/scale.
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[LayoutViewport, VisualViewport, Rect, LayoutViewport, VisualViewport, Rect]]
|
A tuple with the following items: 0. layoutViewport - Deprecated metrics relating to the layout viewport. Is in device pixels. Use |
Source code in zendriver/cdp/page.py
get_manifest_icons()
Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.
.. deprecated:: 1.3
EXPERIMENTAL
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Optional[str]]
|
|
Source code in zendriver/cdp/page.py
get_navigation_history()
Returns navigation history for the current page.
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[int, List[NavigationEntry]]]
|
A tuple with the following items: 0. currentIndex - Index of the current navigation history entry. 1. entries - Array of navigation history entries. |
Source code in zendriver/cdp/page.py
get_origin_trials(frame_id)
Get Origin Trials on given frame.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
|
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[OriginTrial]]
|
|
Source code in zendriver/cdp/page.py
get_permissions_policy_state(frame_id)
Get Permissions Policy state on given frame.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
|
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[PermissionsPolicyFeatureState]]
|
|
Source code in zendriver/cdp/page.py
get_resource_content(frame_id, url)
Returns content of the given resource.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
Frame id to get resource for. |
required |
url
|
str
|
URL of the resource to get content for. |
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[str, bool]]
|
A tuple with the following items: 0. content - Resource content. 1. base64Encoded - True, if content was served as base64. |
Source code in zendriver/cdp/page.py
get_resource_tree()
Returns present frame / resource tree structure.
EXPERIMENTAL
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, FrameResourceTree]
|
Present frame / resource tree structure. |
Source code in zendriver/cdp/page.py
handle_java_script_dialog(accept, prompt_text=None)
Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
accept
|
bool
|
Whether to accept or dismiss the dialog. |
required |
prompt_text
|
Optional[str]
|
(Optional) The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. |
None
|
Source code in zendriver/cdp/page.py
navigate(url, referrer=None, transition_type=None, frame_id=None, referrer_policy=None)
Navigates current page to the given URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
URL to navigate the page to. |
required |
referrer
|
Optional[str]
|
(Optional) Referrer URL. |
None
|
transition_type
|
Optional[TransitionType]
|
(Optional) Intended transition type. |
None
|
frame_id
|
Optional[FrameId]
|
(Optional) Frame id to navigate, if not specified navigates the top frame. |
None
|
referrer_policy
|
Optional[ReferrerPolicy]
|
(EXPERIMENTAL) (Optional) Referrer-policy used for the navigation. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[FrameId, Optional[LoaderId], Optional[str]]]
|
A tuple with the following items: 0. frameId - Frame id that has navigated (or failed to navigate) 1. loaderId - (Optional) Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change. 2. errorText - (Optional) User friendly error message, present if and only if navigation has failed. |
Source code in zendriver/cdp/page.py
navigate_to_history_entry(entry_id)
Navigates current page to the given history entry.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entry_id
|
int
|
Unique id of the entry to navigate to. |
required |
Source code in zendriver/cdp/page.py
print_to_pdf(landscape=None, display_header_footer=None, print_background=None, scale=None, paper_width=None, paper_height=None, margin_top=None, margin_bottom=None, margin_left=None, margin_right=None, page_ranges=None, header_template=None, footer_template=None, prefer_css_page_size=None, transfer_mode=None, generate_tagged_pdf=None, generate_document_outline=None)
Print page as PDF.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
landscape
|
Optional[bool]
|
(Optional) Paper orientation. Defaults to false. |
None
|
display_header_footer
|
Optional[bool]
|
(Optional) Display header and footer. Defaults to false. |
None
|
print_background
|
Optional[bool]
|
(Optional) Print background graphics. Defaults to false. |
None
|
scale
|
Optional[float]
|
(Optional) Scale of the webpage rendering. Defaults to 1. |
None
|
paper_width
|
Optional[float]
|
(Optional) Paper width in inches. Defaults to 8.5 inches. |
None
|
paper_height
|
Optional[float]
|
(Optional) Paper height in inches. Defaults to 11 inches. |
None
|
margin_top
|
Optional[float]
|
(Optional) Top margin in inches. Defaults to 1cm (~0.4 inches). |
None
|
margin_bottom
|
Optional[float]
|
(Optional) Bottom margin in inches. Defaults to 1cm (~0.4 inches). |
None
|
margin_left
|
Optional[float]
|
(Optional) Left margin in inches. Defaults to 1cm (~0.4 inches). |
None
|
margin_right
|
Optional[float]
|
(Optional) Right margin in inches. Defaults to 1cm (~0.4 inches). |
None
|
page_ranges
|
Optional[str]
|
(Optional) Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end. |
None
|
header_template
|
Optional[str]
|
(Optional) HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - ```date |
None
|
footer_template
|
Optional[str]
|
(Optional) HTML template for the print footer. Should use the same format as the |
None
|
prefer_css_page_size
|
Optional[bool]
|
(Optional) Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. |
None
|
transfer_mode
|
Optional[str]
|
(EXPERIMENTAL) (Optional) return as stream |
None
|
generate_tagged_pdf
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice. |
None
|
generate_document_outline
|
Optional[bool]
|
(EXPERIMENTAL) (Optional) Whether or not to embed the document outline into the PDF. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[str, Optional[StreamHandle]]]
|
A tuple with the following items: 0. data - Base64-encoded pdf data. Empty if |
Source code in zendriver/cdp/page.py
2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 |
|
produce_compilation_cache(scripts)
Requests backend to produce compilation cache for the specified scripts.
scripts
are appended to the list of scripts for which the cache
would be produced. The list may be reset during page navigation.
When script with a matching URL is encountered, the cache is optionally
produced upon backend discretion, based on internal heuristics.
See also: Page.compilationCacheProduced
.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scripts
|
List[CompilationCacheParams]
|
|
required |
Source code in zendriver/cdp/page.py
reload(ignore_cache=None, script_to_evaluate_on_load=None, loader_id=None)
Reloads given page optionally ignoring the cache.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ignore_cache
|
Optional[bool]
|
(Optional) If true, browser cache is ignored (as if the user pressed Shift+refresh). |
None
|
script_to_evaluate_on_load
|
Optional[str]
|
(Optional) If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin. |
None
|
loader_id
|
Optional[LoaderId]
|
(EXPERIMENTAL) (Optional) If set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation. |
None
|
Source code in zendriver/cdp/page.py
remove_script_to_evaluate_on_load(identifier)
Deprecated, please use removeScriptToEvaluateOnNewDocument instead.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier
|
ScriptIdentifier
|
|
required |
Source code in zendriver/cdp/page.py
remove_script_to_evaluate_on_new_document(identifier)
Removes given script from the list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
identifier
|
ScriptIdentifier
|
|
required |
Source code in zendriver/cdp/page.py
reset_navigation_history()
Resets navigation history for the current page.
Source code in zendriver/cdp/page.py
screencast_frame_ack(session_id)
Acknowledges that a screencast frame has been received by the frontend.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session_id
|
int
|
Frame number. |
required |
Source code in zendriver/cdp/page.py
search_in_resource(frame_id, url, query, case_sensitive=None, is_regex=None)
Searches for given string in resource content.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
Frame id for resource to search in. |
required |
url
|
str
|
URL of the resource to search in. |
required |
query
|
str
|
String to search for. |
required |
case_sensitive
|
Optional[bool]
|
(Optional) If true, search is case sensitive. |
None
|
is_regex
|
Optional[bool]
|
(Optional) If true, treats string parameter as regex. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[SearchMatch]]
|
List of search matches. |
Source code in zendriver/cdp/page.py
set_ad_blocking_enabled(enabled)
Enable Chrome's experimental ad filter on all sites.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled
|
bool
|
Whether to block ads. |
required |
Source code in zendriver/cdp/page.py
set_bypass_csp(enabled)
Enable page Content Security Policy by-passing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled
|
bool
|
Whether to bypass page CSP. |
required |
Source code in zendriver/cdp/page.py
set_device_metrics_override(width, height, device_scale_factor, mobile, scale=None, screen_width=None, screen_height=None, position_x=None, position_y=None, dont_set_visible_size=None, screen_orientation=None, viewport=None)
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).
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
width
|
int
|
Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
required |
height
|
int
|
Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. |
required |
device_scale_factor
|
float
|
Overriding device scale factor value. 0 disables the override. |
required |
mobile
|
bool
|
Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. |
required |
scale
|
Optional[float]
|
(Optional) Scale to apply to resulting view image. |
None
|
screen_width
|
Optional[int]
|
(Optional) Overriding screen width value in pixels (minimum 0, maximum 10000000). |
None
|
screen_height
|
Optional[int]
|
(Optional) Overriding screen height value in pixels (minimum 0, maximum 10000000). |
None
|
position_x
|
Optional[int]
|
(Optional) Overriding view X position on screen in pixels (minimum 0, maximum 10000000). |
None
|
position_y
|
Optional[int]
|
(Optional) Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). |
None
|
dont_set_visible_size
|
Optional[bool]
|
(Optional) Do not set visible view size, rely upon explicit setVisibleSize call. |
None
|
screen_orientation
|
Optional[ScreenOrientation]
|
(Optional) Screen orientation override. |
None
|
viewport
|
Optional[Viewport]
|
(Optional) The viewport dimensions and scale. If not set, the override is cleared. |
None
|
Source code in zendriver/cdp/page.py
3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 |
|
set_device_orientation_override(alpha, beta, gamma)
Overrides the Device Orientation.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alpha
|
float
|
Mock alpha |
required |
beta
|
float
|
Mock beta |
required |
gamma
|
float
|
Mock gamma |
required |
Source code in zendriver/cdp/page.py
set_document_content(frame_id, html)
Sets given markup as the document's HTML.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame_id
|
FrameId
|
Frame id to set HTML for. |
required |
html
|
str
|
HTML content to set. |
required |
Source code in zendriver/cdp/page.py
set_download_behavior(behavior, download_path=None)
Set the behavior when downloading a file.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
behavior
|
str
|
Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |
required |
download_path
|
Optional[str]
|
(Optional) The default path to save downloaded files to. This is required if behavior is set to 'allow' |
None
|
Source code in zendriver/cdp/page.py
set_font_families(font_families, for_scripts=None)
Set generic font families.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
font_families
|
FontFamilies
|
Specifies font families to set. If a font family is not specified, it won't be changed. |
required |
for_scripts
|
Optional[List[ScriptFontFamilies]]
|
(Optional) Specifies font families to set for individual scripts. |
None
|
Source code in zendriver/cdp/page.py
set_font_sizes(font_sizes)
Set default font sizes.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
font_sizes
|
FontSizes
|
Specifies font sizes to set. If a font size is not specified, it won't be changed. |
required |
Source code in zendriver/cdp/page.py
set_geolocation_override(latitude=None, longitude=None, accuracy=None)
Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.
.. deprecated:: 1.3
Parameters:
Name | Type | Description | Default |
---|---|---|---|
latitude
|
Optional[float]
|
(Optional) Mock latitude |
None
|
longitude
|
Optional[float]
|
(Optional) Mock longitude |
None
|
accuracy
|
Optional[float]
|
(Optional) Mock accuracy |
None
|
Source code in zendriver/cdp/page.py
set_intercept_file_chooser_dialog(enabled)
Intercept file chooser requests and transfer control to protocol clients.
When file chooser interception is enabled, native file chooser dialog is not shown.
Instead, a protocol event Page.fileChooserOpened
is emitted.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled
|
bool
|
|
required |
Source code in zendriver/cdp/page.py
set_lifecycle_events_enabled(enabled)
Controls whether page will emit lifecycle events.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled
|
bool
|
If true, starts emitting lifecycle events. |
required |
Source code in zendriver/cdp/page.py
set_prerendering_allowed(is_allowed)
Enable/disable prerendering manually.
This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details.
TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
is_allowed
|
bool
|
|
required |
Source code in zendriver/cdp/page.py
set_rph_registration_mode(mode)
Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
AutoResponseMode
|
|
required |
Source code in zendriver/cdp/page.py
set_spc_transaction_mode(mode)
Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode
|
AutoResponseMode
|
|
required |
Source code in zendriver/cdp/page.py
set_touch_emulation_enabled(enabled, configuration=None)
Toggles mouse event-based touch event emulation.
.. deprecated:: 1.3
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
enabled
|
bool
|
Whether the touch event emulation should be enabled. |
required |
configuration
|
Optional[str]
|
(Optional) Touch/gesture events configuration. Default: current platform. |
None
|
Source code in zendriver/cdp/page.py
set_web_lifecycle_state(state)
Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state
|
str
|
Target lifecycle state |
required |
Source code in zendriver/cdp/page.py
start_screencast(format_=None, quality=None, max_width=None, max_height=None, every_nth_frame=None)
Starts sending each frame using the screencastFrame
event.
EXPERIMENTAL
Parameters:
Name | Type | Description | Default |
---|---|---|---|
format_
|
Optional[str]
|
(Optional) Image compression format. |
None
|
quality
|
Optional[int]
|
(Optional) Compression quality from range [0..100]. |
None
|
max_width
|
Optional[int]
|
(Optional) Maximum screenshot width. |
None
|
max_height
|
Optional[int]
|
(Optional) Maximum screenshot height. |
None
|
every_nth_frame
|
Optional[int]
|
(Optional) Send every n-th frame. |
None
|
Source code in zendriver/cdp/page.py
stop_loading()
Force the page stop all navigations and pending resource fetches.
Source code in zendriver/cdp/page.py
stop_screencast()
Stops sending each frame in the screencastFrame
.
EXPERIMENTAL
Source code in zendriver/cdp/page.py
wait_for_debugger()
Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
EXPERIMENTAL