autofill
Address
dataclass
Source code in zendriver/cdp/autofill.py
fields: typing.List[AddressField]
instance-attribute
__init__(fields)
from_json(json)
classmethod
AddressField
dataclass
Source code in zendriver/cdp/autofill.py
name: str
instance-attribute
value: str
instance-attribute
__init__(name, value)
from_json(json)
classmethod
AddressFields
dataclass
A list of address fields.
Source code in zendriver/cdp/autofill.py
fields: typing.List[AddressField]
instance-attribute
__init__(fields)
from_json(json)
classmethod
AddressFormFilled
dataclass
Emitted when an address form is filled.
Source code in zendriver/cdp/autofill.py
address_ui: AddressUI
instance-attribute
filled_fields: typing.List[FilledField]
instance-attribute
__init__(filled_fields, address_ui)
from_json(json)
classmethod
AddressUI
dataclass
Defines how an address can be displayed like in chrome://settings/addresses. Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such. The following address UI for instance: [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should allow the receiver to render: Jon Doe Munich 81456
Source code in zendriver/cdp/autofill.py
address_fields: typing.List[AddressFields]
instance-attribute
__init__(address_fields)
from_json(json)
classmethod
CreditCard
dataclass
Source code in zendriver/cdp/autofill.py
cvc: str
instance-attribute
expiry_month: str
instance-attribute
expiry_year: str
instance-attribute
name: str
instance-attribute
number: str
instance-attribute
__init__(number, name, expiry_month, expiry_year, cvc)
from_json(json)
classmethod
to_json()
FilledField
dataclass
Source code in zendriver/cdp/autofill.py
autofill_type: str
instance-attribute
field_id: dom.BackendNodeId
instance-attribute
filling_strategy: FillingStrategy
instance-attribute
frame_id: page.FrameId
instance-attribute
html_type: str
instance-attribute
id_: str
instance-attribute
name: str
instance-attribute
value: str
instance-attribute
__init__(html_type, id_, name, value, autofill_type, filling_strategy, frame_id, field_id)
from_json(json)
classmethod
Source code in zendriver/cdp/autofill.py
to_json()
Source code in zendriver/cdp/autofill.py
FillingStrategy
Bases: Enum
Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
Source code in zendriver/cdp/autofill.py
AUTOCOMPLETE_ATTRIBUTE = 'autocompleteAttribute'
class-attribute
instance-attribute
AUTOFILL_INFERRED = 'autofillInferred'
class-attribute
instance-attribute
from_json(json)
classmethod
disable()
Disables autofill domain notifications.
enable()
Enables autofill domain notifications.
set_addresses(addresses)
Set addresses so that developers can verify their forms implementation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
addresses
|
List[Address]
|
|
required |
Source code in zendriver/cdp/autofill.py
trigger(field_id, card, frame_id=None)
Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
field_id
|
BackendNodeId
|
Identifies a field that serves as an anchor for autofill. |
required |
frame_id
|
Optional[FrameId]
|
(Optional) Identifies the frame that field belongs to. |
None
|
card
|
CreditCard
|
Credit card information to fill out the form. Credit card data is not saved. |
required |