Skip to content

Conversation

@mohamedamir
Copy link
Contributor

@mohamedamir mohamedamir commented Sep 24, 2025

Closes #357

The following tasks have been completed:

  • Modified Web platform tests (link)

Implementation commitment:

  • WebKit (link to issue)
  • Chromium
  • Gecko (link to issue)

Documentation and checks

  • Affects privacy
  • Affects security
  • Pinged MDN
  • Updated Explainer
  • Updated digitalcredentials.dev

Preview | Diff

@mohamedamir mohamedamir requested a review from a team as a code owner September 24, 2025 23:29
@mohamedamir mohamedamir changed the title User Agent Automation for WebDrive test support User Agent Automation and WebDrive test support Sep 24, 2025
</tbody>
</table>
<p>
When <a data-cite="webdriver#dfn-validate-capabilities">validating
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: avoid using data-cite... if something hasn't been exported from Web Driver, we should send a PR to web driver to export the definition we need.

index.html Outdated
Comment on lines 2266 to 2267
<code>navigator.credentials.get({digital: ...})</code> or
<code>navigator.credentials.create({digital: ...})</code> call.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably link to the algorithms, not to the methods themselves.

</table>
<p>
The parameters object is a JSON <a data-cite=
"webdriver#dfn-object">Object</a> with the following key:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above... we should get "object" exported from Web Driver.

index.html Outdated
The [=remote end steps=] are:
</p>
<ol class="algorithm">
<li>If <code>parameters</code> is not a JSON <a data-cite=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are JSON object and Web Driver objects different things?

Also, I wonder if this should really be framed in Web Driver 2 terminology, which I think is CBOR.

We should definitely have the Web Driver folks check all this before we merge it too.

</section>
<section id="set-wallet-to-decline">
<h4>
<dfn>Set Wallet to Decline</dfn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should say "abort" here to keep terminology consistent? (i.e., affectively this become an AbortError, right)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YEs, but it's to simulate a user "declining" the flow.
I feel "decline" is more natural.
Let me know if you feel strongly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, "declining" is fine... was mostly an editorial suggestion.

Copy link
Collaborator

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like where this is going, but I'm not loving the way the model integrates with the algorithms.

What we should have is basically:

  • There is (or are) virtual wallet(s).
  • Each virtual wallets is in some state.
  • Virtual wallet's state can be changed.

Virtual wallets take precedence over platform [=holders=] when in automation.

<tbody>
<tr>
<td>
Virtual Wallet Support
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Virtual Wallet Support
Virtual Credential Manager Support

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't really used "wallet" formally... we've stuck to holder... so I wonder if this should be "virtual holder"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timcappalli I am aware of your preferences to use "Credential Manager" instead of holder or wallet, but I think we should do this holistically in the whole spec at one time if we decide to. I won't start with the testing.

@marcoscaceres Yes, I can see we haven't used wallet formally, but given this API is exposed to web developers as well as browser engineers, I believe "wallet" is the more widely-used term in the ecosystem.
"holder" might be even more confusing IMHO.
We can also add a definition to wallet in this section. WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @mohamedamir and drafted:
#386

And hopefully that covers the "manager" aspect that @timcappalli would like included in the definition, while giving us a well understood concept by developer and implementers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "virtual (whatever)" is not accurate and will be misunderstood.

Better might be "software (whatever)" (even if it's implemented on hardware, it's still software doing the lifting).

Rather than Virtual Credential Manager Support, I would suggest Support for Software Credential Managers or perhaps Support for Agentic Credential Managers.

index.html Outdated
Virtual Wallet Support
</td>
<td>
<code>digital-credentials:virtualWallet</code>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>digital-credentials:virtualWallet</code>
<code>digital-credentials:virtualCredentialManager</code>

[=boolean=]
</td>
<td>
Indicates whether the endpoint node supports all Virtual Wallet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Indicates whether the endpoint node supports all Virtual Wallet
Indicates whether the endpoint node supports all Virtual Credential Manager

index.html Outdated
<p>
When <a data-cite="webdriver#dfn-validate-capabilities">validating
capabilities</a>, the extension-specific substeps to validate
<code>digital-credentials:virtualWallet</code> with
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>digital-credentials:virtualWallet</code> with
<code>digital-credentials:virtualCredentialManager</code> with

index.html Outdated
<p>
When <a data-cite="webdriver#dfn-matching-capabilities">matching
capabilities</a>, the extension-specific steps to match
<code>digital-credentials:virtualWallet</code> with
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>digital-credentials:virtualWallet</code> with
<code>digital-credentials:virtualCredentialManager</code> with

index.html Outdated
<ol class="algorithm">
<li>If <code>value</code> is <code>true</code> and the
<a data-cite="webdriver#dfn-endpoint-node">endpoint node</a> does
not support any of the Virtual Wallet commands, the match is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
not support any of the Virtual Wallet commands, the match is
not support any of the Virtual Credential Manager commands, the match is

index.html Outdated
Comment on lines 2263 to 2265
The following commands allow controlling the behavior of a virtual
wallet for testing purposes. These commands affect the <dfn>next
wallet behavior</dfn> of the next
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following commands allow controlling the behavior of a virtual
wallet for testing purposes. These commands affect the <dfn>next
wallet behavior</dfn> of the next
The following commands allow controlling the behavior of a virtual
credential manager for testing purposes. These commands affect the <dfn>next
credential manager behavior</dfn> of the next

index.html Outdated
Comment on lines 2269 to 2271
<section id="set-wallet-response">
<h4>
<dfn>Set Wallet Response</dfn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<section id="set-wallet-response">
<h4>
<dfn>Set Wallet Response</dfn>
<section id="set-cm-response">
<h4>
<dfn>Set Credential Manager Response</dfn>

index.html Outdated
<dfn>Set Wallet Response</dfn>
</h4>
<p>
The [=Set Wallet Response=] [[WebDriver]] [=extension command=]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [=Set Wallet Response=] [[WebDriver]] [=extension command=]
The [=Set Credential Manager Response=] [[WebDriver]] [=extension command=]

index.html Outdated
</h4>
<p>
The [=Set Wallet Response=] [[WebDriver]] [=extension command=]
configures the virtual wallet to respond with a specific data
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configures the virtual wallet to respond with a specific data
configures the virtual credential manager to respond with a specific data

string
</td>
<td>
The data to be returned by the wallet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The data to be returned by the wallet.
The data to be returned by the credential manager.

</section>
<section id="set-wallet-to-wait">
<h4>
<dfn>Set Wallet to Wait</dfn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dfn>Set Wallet to Wait</dfn>
<dfn>Set Credential Manager to Wait</dfn>

</li>
</ol>
</section>
<section id="set-wallet-to-wait">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<section id="set-wallet-to-wait">
<section id="set-cm-to-wait">

Comment on lines +2355 to +2357
The [=Set Wallet to Wait=] [[WebDriver]] [=extension command=]
configures the virtual wallet to simulate a user waiting
indefinitely in the wallet UI.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [=Set Wallet to Wait=] [[WebDriver]] [=extension command=]
configures the virtual wallet to simulate a user waiting
indefinitely in the wallet UI.
The [=Set Credential Manager to Wait=] [[WebDriver]] [=extension command=]
configures the virtual credential manager to simulate a user waiting
indefinitely in the credential manager UI.

The [=remote end steps=] are:
</p>
<ol class="algorithm">
<li>Set the session's [=next wallet behavior=] to <code>{ "mode":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>Set the session's [=next wallet behavior=] to <code>{ "mode":
<li>Set the session's [=next credential manager behavior=] to <code>{ "mode":

Comment on lines +2393 to +2395
<section id="set-wallet-to-decline">
<h4>
<dfn>Set Wallet to Decline</dfn>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<section id="set-wallet-to-decline">
<h4>
<dfn>Set Wallet to Decline</dfn>
<section id="set-cm-to-decline">
<h4>
<dfn>Set Credential Manager to Decline</dfn>

Comment on lines +2398 to +2400
The [=Set Wallet to Decline=] [[WebDriver]] [=extension command=]
configures the virtual wallet to simulate a user declining the
request.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [=Set Wallet to Decline=] [[WebDriver]] [=extension command=]
configures the virtual wallet to simulate a user declining the
request.
The [=Set Credential Manager to Decline=] [[WebDriver]] [=extension command=]
configures the virtual credential manager to simulate a user declining the
request.

The [=remote end steps=] are:
</p>
<ol class="algorithm">
<li>Set the session's [=next wallet behavior=] to <code>{ "mode":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>Set the session's [=next wallet behavior=] to <code>{ "mode":
<li>Set the session's [=next credential manager behavior=] to <code>{ "mode":

</li>
</ol>
</section>
<section id="virtual-wallet-commands">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<section id="virtual-wallet-commands">
<section id="virtual-cm-commands">

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to avoid acronyms 🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how much acronym avoidance matters in fragment identifiers, but it still might be better to abbreviate somewhat less, perhaps as —

Suggested change
<section id="virtual-wallet-commands">
<section id="virtual-cred-mgr-commands">

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave ReSpec to generate the ids. It knows best.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pro-tip: you can also omit the section tag (ReSpec adds it automatically)

This section is a work in progress as this document evolves.
</p>
</section>
<section id="user-agent-automation" data-cite="webdriver">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: let ReSpec handle the id generation.

Suggested change
<section id="user-agent-automation" data-cite="webdriver">
<section data-cite="webdriver">

@marcoscaceres marcoscaceres changed the title User Agent Automation and WebDrive test support User Agent Automation and WebDriver test support Oct 9, 2025
Virtual Wallet Support
</td>
<td>
`digital-credentials:virtualWallet`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`digital-credentials:virtualWallet`
`digital-credentials:virtualHolder`

@mohamedamir mohamedamir force-pushed the user-agent-automation branch from f46b5fd to 9b60592 Compare November 3, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add means to test Digital Credentials API

5 participants