From 6175ccf8bcdb7fb816ae43ea1d0c0565f932beff Mon Sep 17 00:00:00 2001
From: Mohamed Amir Yosef
+
+
+
+
+
+ For the purposes of user agent automation and web application testing, this document defines a number of [[WebDriver]] [=extension commands=]. +
++ 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:
+
value is not a [=boolean=], return a [=error|WebDriver error=] with a [=error code|WebDriver error code=] [=invalid argument=].deserialized be set to value.
+ When matching capabilities, the extension-specific steps to match digital-credentials:virtualWallet with value are the following:
+
value is true and the endpoint node does not support any of the Virtual Wallet commands, the match is unsuccessful.
+ The following commands allow controlling the behavior of a virtual wallet for testing purposes. These commands affect the behavior of the next navigator.credentials.get({digital: ...}) or navigator.credentials.create({digital: ...}) call.
+
+ 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:
+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=].{ "mode": "respond", "data": parameters.data }.+ 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:
+{ "mode": "wait" }.+ 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:
+{ "mode": "decline" }.