Table of Contents

Interface IAutofill

Namespace
Selenium.WebDriver.BiDi.Cdp.Autofill
Assembly
Selenium.WebDriver.BiDi.Cdp.dll

Defines commands and events for Autofill.

[Experimental("BIDICDP001")]
public interface IAutofill

Properties

AddressFormFilled

Emitted when an address form is filled.

IEventSource<AddressFormFilledEventArgs> AddressFormFilled { get; }

Property Value

IEventSource<AddressFormFilledEventArgs>

Remarks

Event args (AddressFormFilledEventArgs):

  • FilledFields - Information about the fields that were filled
  • AddressUi - An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line.

Methods

DisableAsync(string?, CancellationToken)

Disables autofill domain notifications.

Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<DisableResult>

A task representing the asynchronous operation, containing a DisableResult.

EnableAsync(string?, CancellationToken)

Enables autofill domain notifications.

Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)

Parameters

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<EnableResult>

A task representing the asynchronous operation, containing a EnableResult.

SetAddressesAsync(ImmutableArray<Address>, string?, CancellationToken)

Set addresses so that developers can verify their forms implementation.

Task<SetAddressesResult> SetAddressesAsync(ImmutableArray<Address> addresses, string? session = null, CancellationToken cancellationToken = default)

Parameters

addresses ImmutableArray<Address>
session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<SetAddressesResult>

A task representing the asynchronous operation, containing a SetAddressesResult.

TriggerAsync(BackendNodeId, FrameId?, CreditCard?, Address?, string?, CancellationToken)

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

Task<TriggerResult> TriggerAsync(BackendNodeId fieldId, FrameId? frameId = null, CreditCard? card = null, Address? address = null, string? session = null, CancellationToken cancellationToken = default)

Parameters

fieldId BackendNodeId

Identifies a field that serves as an anchor for autofill.

frameId FrameId

Identifies the frame that field belongs to.

card CreditCard

Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with address.

address Address

Address to fill out the form. Address data is not saved. Mutually exclusive with card.

session string

Optional CDP session override.

cancellationToken CancellationToken

A token to cancel the asynchronous operation.

Returns

Task<TriggerResult>

A task representing the asynchronous operation, containing a TriggerResult.