You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The remote end steps with |session| and |command parameters| are:
411
-
412
-
1. Let |navigable id| be the value of the `context` field of |command parameters|.
413
-
1. Let |navigable| be the result of trying to get a navigable with |navigable id|.
414
-
1. Let |document| be |navigable|'s active document.
415
-
1. Let |environment settings| be the [=environment settings object=] whose [=relevant global object=]'s associated Document is |document|.
416
-
1. Let |realm| be |environment settings|'s [=realm execution context=]'s Realm component.
417
-
1. Let |element id| be the value of the `element` field of |command parameters|.
418
-
1. Let |element| be the result of trying to deserialize remote reference with |element id|, |realm|, and |session|.
419
-
1. If |element| is not a [=form control=] or |element|'s form owner is null, return an error with error code "invalid element state".
420
-
1. Let |card| be the value of the `card` field of |command parameters| if present, or null otherwise.
421
-
1. Let |address| be the value of the `address` field of |command parameters| if present, or null otherwise.
422
-
1. If both |card| and |address| are not null, return an error with error code "invalid argument".
423
-
1. If both |card| and |address| are null, return an error with error code "invalid argument".
424
-
1. If the user agent is unable to perform [=autofill=], return an error with error code "unsupported operation".
425
-
1. Let |parsed card| be the result of parsing |card| as an <code>autofill.Card</code>.
426
-
1. Let |parsed address| be the result of parsing |address| as an <code>autofill.Address</code>.
427
-
1. The user agent should [=autofill=] |element| and |element|'s form owner, while taking into account the contents of |parsed card| and |parsed address|.
428
-
1. Return success with data null.
429
-
430
-
</div>
431
-
432
-
<div class="example">
433
-
Using WebDriver BiDi to trigger address autofill:
434
-
435
-
```json
436
-
{
437
-
"method": "autofill.trigger",
438
-
"params": {
439
-
"context": "context-id-123",
440
-
"element": { "sharedId": "element-id-456" },
441
-
"address": {
442
-
"fields": [
443
-
{ "name": "given-name", "value": "John" },
444
-
{ "name": "family-name", "value": "Doe" },
445
-
{ "name": "street-address", "value": "123 Main St" },
0 commit comments