diff --git a/index.html b/index.html index 1381f114..6dba4e74 100644 --- a/index.html +++ b/index.html @@ -2141,6 +2141,265 @@

This section is a work in progress as this document evolves.

+
+

+ User Agent Automation +

+

+ For the purposes of user agent automation and web application testing, + this document defines a number of [[WebDriver]] [=extension commands=]. +

+
+

+ Digital Credentials WebDriver Extension Capability +

+

+ In order to advertise the availability of [=extension commands=] + defined below, a new extension capability is defined. +

+ + + + + + + + + + + + + + + + + +
+ Capability + + Key + + Value Type + + Description +
+ Virtual Wallet Support + + `digital-credentials:virtualWallet` + + [=boolean=] + + Indicates whether the endpoint node supports all Virtual Wallet + commands. +
+

+ When validating + capabilities, the extension-specific substeps to validate + `digital-credentials:virtualWallet` with `value` are the following: +

+
    +
  1. If `value` is not a [=boolean=], return a [=error|WebDriver + error=] with a [=error code|WebDriver error code=] [=invalid + argument=]. +
  2. +
  3. Otherwise, let `deserialized` be set to `value`. +
  4. +
+

+ When matching + capabilities, the extension-specific steps to match + `digital-credentials:virtualWallet` with `value` are the following: +

+
    +
  1. If `value is true` and the endpoint node does not support any + of the Virtual Wallet commands, the match is unsuccessful. +
  2. +
  3. + Otherwise, the match is successful. +
  4. +
+
+
+

+ Virtual Wallet Commands +

+

+ The following commands allow controlling the behavior of a + virtual wallet for testing purposes. These commands affect the + next wallet behavior of the next + `navigator.credentials.get({digital: ...})` or + `navigator.credentials.create({digital: ...})` call. +

+
+

+ Set Wallet Response +

+

+ The [=Set Wallet Response=] [[WebDriver]] [=extension + command=] configures the virtual wallet to respond with a specific + data payload, simulating a user successfully completing the + flow. +

+ + + + + + + + + + + + + +
+ HTTP Method + + URI Template +
+ `POST` + + /session/{session + id}/digital-credentials/response +
+

+ The parameters object is a JSON Object with the following key: +

+ + + + + + + + + + + + + + + +
+ Key + + Value Type + + Description +
+ `data` + + string + + The data to be returned by the wallet. +
+

+ The [=remote end steps=] are: +

+
    +
  1. If `parameters` is not a JSON Object, or if it does not contain a + `data` property of type string, return a [=error|WebDriver error=] + with [=error code|WebDriver error code=] [=invalid argument=]. +
  2. +
  3. Set the session's [=next wallet behavior=] to { "mode": + "respond", "data": parameters.data }. +
  4. +
  5. Return [=success=]. +
  6. +
+
+
+

+ Set Wallet to Wait +

+

+ The [=Set Wallet to Wait=] [[WebDriver]] [=extension command=] + configures the virtual wallet to simulate a user waiting + indefinitely in the wallet UI. +

+ + + + + + + + + + + + + +
+ HTTP Method + + URI Template +
+ `POST` + + /session/{session + id}/digital-credentials/response_wait +
+

+ The [=remote end steps=] are: +

+
    +
  1. Set the session's [=next wallet behavior=] to { "mode": + "wait" }. +
  2. +
  3. Return [=success=]. +
  4. +
+
+
+

+ Set Wallet to Decline +

+

+ The [=Set Wallet to Decline=] [[WebDriver]] [=extension command=] + configures the virtual wallet to simulate a user declining the + request. +

+ + + + + + + + + + + + + +
+ HTTP Method + + URI Template +
+ `POST` + + /session/{session + id}/digital-credentials/response_decline +
+

+ The [=remote end steps=] are: +

+
    +
  1. Set the session's [=next wallet behavior=] to { "mode": + "decline" }. +
  2. +
  3. Return [=success=]. +
  4. +
+
+
+