CDPotion.Domain.Autofill (cdpotion v0.1.2)

Summary

Types

description not provided :(

description not provided :(

description not provided :(

Functions

Set addresses so that developers can verify their forms implementation.

Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.

Types

@type address() :: %{fields: [address_field()]}

description not provided :(

Link to this type

address_field()

@type address_field() :: %{name: String.t(), value: String.t()}

description not provided :(

Link to this type

credit_card()

@type credit_card() :: %{
  cvc: String.t(),
  expiryMonth: String.t(),
  expiryYear: String.t(),
  name: String.t(),
  number: String.t()
}

description not provided :(

Functions

Link to this function

set_addresses(addresses)

@spec set_addresses([CDPotion.Domain.Autofill.Address]) :: {String.t(), map()}

Set addresses so that developers can verify their forms implementation.

Parameters:

  • addresses:description not provided :(
Link to this function

trigger(field_id, frame_id \\ nil, card)

@spec trigger(
  CDPotion.Domain.DOM.BackendNodeId,
  CDPotion.Domain.Page.FrameId,
  CDPotion.Domain.Autofill.CreditCard
) :: {String.t(), map()}

Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.

Parameters:

  • field_id:Identifies a field that serves as an anchor for autofill.
  • frame_id:(Optional) Identifies the frame that field belongs to.
  • card:Credit card information to fill out the form. Credit card data is not saved.