# DO NOT EDIT THIS FILE!
#
# This file is generated from the CDP specification. If you need to make
# changes, edit the generator and regenerate all of the modules.
#
# CDP domain: Network
from __future__ import annotations
from .util import event_class, T_JSON_DICT
from dataclasses import dataclass
import enum
import typing
from . import debugger
from . import emulation
from . import io
from . import page
from . import runtime
from . import security
class ResourceType(enum.Enum):
'''
Resource type as it was perceived by the rendering engine.
'''
DOCUMENT = "Document"
STYLESHEET = "Stylesheet"
IMAGE = "Image"
MEDIA = "Media"
FONT = "Font"
SCRIPT = "Script"
TEXT_TRACK = "TextTrack"
XHR = "XHR"
FETCH = "Fetch"
EVENT_SOURCE = "EventSource"
WEB_SOCKET = "WebSocket"
MANIFEST = "Manifest"
SIGNED_EXCHANGE = "SignedExchange"
PING = "Ping"
CSP_VIOLATION_REPORT = "CSPViolationReport"
PREFLIGHT = "Preflight"
OTHER = "Other"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
class LoaderId(str):
'''
Unique loader identifier.
'''
def to_json(self) -> str:
return self
@classmethod
def from_json(cls, json: str) -> LoaderId:
return cls(json)
def __repr__(self):
return 'LoaderId({})'.format(super().__repr__())
class RequestId(str):
'''
Unique request identifier.
'''
def to_json(self) -> str:
return self
@classmethod
def from_json(cls, json: str) -> RequestId:
return cls(json)
def __repr__(self):
return 'RequestId({})'.format(super().__repr__())
class InterceptionId(str):
'''
Unique intercepted request identifier.
'''
def to_json(self) -> str:
return self
@classmethod
def from_json(cls, json: str) -> InterceptionId:
return cls(json)
def __repr__(self):
return 'InterceptionId({})'.format(super().__repr__())
class ErrorReason(enum.Enum):
'''
Network level fetch failure reason.
'''
FAILED = "Failed"
ABORTED = "Aborted"
TIMED_OUT = "TimedOut"
ACCESS_DENIED = "AccessDenied"
CONNECTION_CLOSED = "ConnectionClosed"
CONNECTION_RESET = "ConnectionReset"
CONNECTION_REFUSED = "ConnectionRefused"
CONNECTION_ABORTED = "ConnectionAborted"
CONNECTION_FAILED = "ConnectionFailed"
NAME_NOT_RESOLVED = "NameNotResolved"
INTERNET_DISCONNECTED = "InternetDisconnected"
ADDRESS_UNREACHABLE = "AddressUnreachable"
BLOCKED_BY_CLIENT = "BlockedByClient"
BLOCKED_BY_RESPONSE = "BlockedByResponse"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
class TimeSinceEpoch(float):
'''
UTC time in seconds, counted from January 1, 1970.
'''
def to_json(self) -> float:
return self
@classmethod
def from_json(cls, json: float) -> TimeSinceEpoch:
return cls(json)
def __repr__(self):
return 'TimeSinceEpoch({})'.format(super().__repr__())
class MonotonicTime(float):
'''
Monotonically increasing time in seconds since an arbitrary point in the past.
'''
def to_json(self) -> float:
return self
@classmethod
def from_json(cls, json: float) -> MonotonicTime:
return cls(json)
def __repr__(self):
return 'MonotonicTime({})'.format(super().__repr__())
class Headers(dict):
'''
Request / response headers as keys / values of JSON object.
'''
def to_json(self) -> dict:
return self
@classmethod
def from_json(cls, json: dict) -> Headers:
return cls(json)
def __repr__(self):
return 'Headers({})'.format(super().__repr__())
class ConnectionType(enum.Enum):
'''
The underlying connection technology that the browser is supposedly using.
'''
NONE = "none"
CELLULAR2G = "cellular2g"
CELLULAR3G = "cellular3g"
CELLULAR4G = "cellular4g"
BLUETOOTH = "bluetooth"
ETHERNET = "ethernet"
WIFI = "wifi"
WIMAX = "wimax"
OTHER = "other"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
class CookieSameSite(enum.Enum):
'''
Represents the cookie's 'SameSite' status:
https://tools.ietf.org/html/draft-west-first-party-cookies
'''
STRICT = "Strict"
LAX = "Lax"
NONE = "None"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
class CookiePriority(enum.Enum):
'''
Represents the cookie's 'Priority' status:
https://tools.ietf.org/html/draft-west-cookie-priority-00
'''
LOW = "Low"
MEDIUM = "Medium"
HIGH = "High"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
class CookieSourceScheme(enum.Enum):
'''
Represents the source scheme of the origin that originally set the cookie.
A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme.
This is a temporary ability and it will be removed in the future.
'''
UNSET = "Unset"
NON_SECURE = "NonSecure"
SECURE = "Secure"
def to_json(self):
return self.value
@classmethod
def from_json(cls, json):
return cls(json)
@dataclass
class ResourceTiming:
'''
Timing information for the request.
'''
#: Timing's requestTime is a baseline in seconds, while the other numbers are ticks in
#: milliseconds relatively to this requestTime.
request_time: float
#: Started resolving proxy.
proxy_start: float
#: Finished resolving proxy.
proxy_end: float
#: Started DNS address resolve.
dns_start: float
#: Finished DNS address resolve.
dns_end: float
#: Started connecting to the remote host.
connect_start: float
#: Connected to the remote host.
connect_end: float
#: Started SSL handshake.
ssl_start: float
#: Finished SSL handshake.
ssl_end: float
#: Started running ServiceWorker.
worker_start: float
#: Finished Starting ServiceWorker.
worker_ready: float
#: Started fetch event.
worker_fetch_start: float
#: Settled fetch event respondWith promise.
worker_respond_with_settled: float
#: Started sending request.
send_start: float
#: Finished sending request.
send_end: float
#: Time the server started pushing request.
push_start: float
#: Time the server finished pushing request.
push_end: float
#: Finished receiving response headers.
receive_headers_end: float
def to_json(self):
json = dict()
json['requestTime'] = self.request_time
json['proxyStart'] = self.proxy_start
json['proxyEnd'] = self.proxy_end
json['dnsStart'] = self.dns_start
json['dnsEnd'] = self.dns_end
json['connectStart'] = self.connect_start
json['connectEnd'] = self.connect_end
json['sslStart'] = self.ssl_start
json['sslEnd'] = self.ssl_end
json['workerStart'] = self.worker_start
json['workerReady'] = self.worker_ready
json['workerFetchStart'] = self.worker_fetch_start
json['workerRespondWithSettled'] = self.worker_respond_with_settled
json['sendStart'] = self.send_start
json['sendEnd'] = self.send_end
json['pushStart'] = self.push_start
json['pushEnd'] = self.push_end
json['receiveHeadersEnd'] = self.receive_headers_end
return json
@classmethod
def from_json(cls, json):
return cls(
request_time=float(json['requestTime']),
proxy_start=float(json['proxyStart']),
proxy_end=float(json['proxyEnd']),
dns_start=float(json['dnsStart']),
dns_en
没有合适的资源?快使用搜索试试~ 我知道了~
selenium包wenjian1
共587个文件
py:289个
pyc:289个
typed:4个
需积分: 0 2 下载量 40 浏览量
2023-01-13
19:44:57
上传
评论
收藏 2.04MB RAR 举报
温馨提示
selenium包wenjian1
资源推荐
资源详情
资源评论
收起资源包目录
selenium包wenjian1 (587个子文件)
findElements.js 53KB
isDisplayed.js 43KB
getAttribute.js 42KB
mutation-listener.js 2KB
webdriver_prefs.json 3KB
network.py 117KB
network.py 117KB
network.py 113KB
page.py 97KB
page.py 96KB
page.py 95KB
network.py 85KB
page.py 69KB
dom.py 57KB
dom.py 57KB
dom.py 57KB
runtime.py 54KB
runtime.py 54KB
runtime.py 54KB
dom.py 53KB
runtime.py 50KB
webdriver.py 50KB
overlay.py 49KB
css.py 48KB
css.py 48KB
css.py 48KB
overlay.py 47KB
overlay.py 47KB
debugger.py 43KB
debugger.py 43KB
debugger.py 43KB
debugger.py 42KB
css.py 42KB
audits.py 38KB
audits.py 37KB
audits.py 37KB
dom_snapshot.py 35KB
dom_snapshot.py 35KB
dom_snapshot.py 35KB
dom_snapshot.py 33KB
input_.py 27KB
input_.py 27KB
input_.py 27KB
webelement.py 26KB
overlay.py 24KB
emulation.py 24KB
emulation.py 24KB
emulation.py 23KB
remote_connection.py 21KB
emulation.py 20KB
browser.py 20KB
browser.py 20KB
browser.py 20KB
target.py 20KB
target.py 20KB
input_.py 19KB
target.py 19KB
accessibility.py 18KB
accessibility.py 18KB
profiler.py 18KB
fetch.py 18KB
fetch.py 18KB
accessibility.py 18KB
target.py 18KB
cdp.py 17KB
browser.py 17KB
profiler.py 17KB
audits.py 17KB
security.py 17KB
security.py 17KB
security.py 17KB
security.py 17KB
web_audio.py 16KB
web_audio.py 16KB
web_audio.py 16KB
web_audio.py 16KB
fetch.py 16KB
fetch.py 16KB
profiler.py 15KB
profiler.py 15KB
event_firing_webdriver.py 15KB
expected_conditions.py 15KB
layer_tree.py 15KB
layer_tree.py 15KB
layer_tree.py 15KB
layer_tree.py 15KB
accessibility.py 15KB
firefox_profile.py 14KB
webdriver.py 13KB
indexed_db.py 12KB
indexed_db.py 12KB
indexed_db.py 12KB
indexed_db.py 12KB
tracing.py 12KB
tracing.py 12KB
tracing.py 12KB
color.py 12KB
errorhandler.py 12KB
web_authn.py 12KB
web_authn.py 12KB
共 587 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
xialan2202
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功