Skip to content

Commit 0499a49

Browse files
committed
Move webdriver integration out for now
1 parent fdbb693 commit 0499a49

File tree

2 files changed

+0
-151
lines changed

2 files changed

+0
-151
lines changed

index.bs

Lines changed: 0 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -324,157 +324,6 @@ Using `full-address` to enable comprehensive address autofill:
324324
```
325325
</div>
326326

327-
# WebDriver BiDi Integration # {#webdriver-bidi}
328-
329-
This section defines the integration with [[WEBDRIVER-BIDI]] for automated testing of autofill functionality.
330-
331-
## The autofill Module ## {#webdriver-bidi-module}
332-
333-
The <dfn export>autofill module</dfn> contains functionality for triggering autofill programmatically
334-
in automated testing scenarios.
335-
336-
### The autofill.trigger Command ### {#webdriver-bidi-trigger}
337-
338-
The <dfn export>autofill.trigger</dfn> command triggers [=autofill=] on a particular form field
339-
using the provided data.
340-
341-
<dl>
342-
<dt>Command Type</dt>
343-
<dd>
344-
<pre highlight="cddl">
345-
autofill.Trigger = (
346-
method: "autofill.trigger",
347-
params: autofill.TriggerParameters
348-
)
349-
350-
autofill.TriggerParameters = {
351-
context: browsingContext.BrowsingContext,
352-
element: script.SharedReference,
353-
? card: autofill.Card,
354-
? address: autofill.Address
355-
}
356-
357-
autofill.Card = {
358-
number: text,
359-
name: text,
360-
expiryMonth: text,
361-
expiryYear: text,
362-
cvc: text
363-
}
364-
365-
autofill.Address = {
366-
fields: [* autofill.Field]
367-
}
368-
369-
autofill.Field = {
370-
name: autofill.FieldName,
371-
value: text
372-
}
373-
374-
autofill.FieldName = "name" /
375-
"honorific-prefix" /
376-
"given-name" /
377-
"additional-name" /
378-
"family-name" /
379-
"honorific-suffix" /
380-
"nickname" /
381-
"organization" /
382-
"street-address" /
383-
"address-line1" /
384-
"address-line2" /
385-
"address-line3" /
386-
"address-level4" /
387-
"address-level3" /
388-
"address-level2" /
389-
"address-level1" /
390-
"country" /
391-
"country-name" /
392-
"postal-code" /
393-
"tel" /
394-
"tel-country-code" /
395-
"tel-national" /
396-
"tel-area-code" /
397-
"tel-local" /
398-
"email"
399-
</pre>
400-
</dd>
401-
<dt>Return Type</dt>
402-
<dd><code>EmptyResult</code></dd>
403-
</dl>
404-
405-
The `autofill.FieldName` values correspond to the [=autofill field names=] defined in [[HTML]].
406-
407-
### Processing Steps ### {#webdriver-bidi-steps}
408-
409-
<div algorithm="autofill.trigger processing steps">
410-
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" },
446-
{ "name": "address-level2", "value": "San Francisco" },
447-
{ "name": "address-level1", "value": "CA" },
448-
{ "name": "postal-code", "value": "94102" },
449-
{ "name": "country", "value": "US" }
450-
]
451-
}
452-
}
453-
}
454-
```
455-
</div>
456-
457-
<div class="example">
458-
Using WebDriver BiDi to trigger credit card autofill:
459-
460-
```json
461-
{
462-
"method": "autofill.trigger",
463-
"params": {
464-
"context": "context-id-123",
465-
"element": { "sharedId": "cc-number-element-id" },
466-
"card": {
467-
"number": "4111111111111111",
468-
"name": "John Doe",
469-
"expiryMonth": "12",
470-
"expiryYear": "2028",
471-
"cvc": "123"
472-
}
473-
}
474-
}
475-
```
476-
</div>
477-
478327
# Security and Privacy Considerations # {#security-privacy}
479328

480329
## Timing Attacks ## {#timing-attacks}

webdriver_integration.bs

Whitespace-only changes.

0 commit comments

Comments
 (0)