-
Notifications
You must be signed in to change notification settings - Fork 28
User Agent Automation and WebDriver test support #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
6175ccf
783df7d
4c1c17c
deaa4c6
8300b5c
9b60592
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -856,6 +856,22 @@ <h3> | |||||||||||||
| </li> | ||||||||||||||
| </ol> | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the session's [=next wallet behavior=] is set: | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| <ol> | ||||||||||||||
| <li>If the mode is "respond", resolve the promise with a new | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| `DigitalCredential` object whose `data` member is set to the stored | ||||||||||||||
| `data`. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the mode is "wait", the promise never resolves. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the mode is "decline", reject the promise with a | ||||||||||||||
| "NotAllowedError" `DOMException`. | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| </li> | ||||||||||||||
| </ol> | ||||||||||||||
| </li> | ||||||||||||||
| <li>Otherwise (if [=next wallet behavior=] is not set), proceed with the | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| normal user-interactive flow to select and use a digital credential. | ||||||||||||||
| </li> | ||||||||||||||
| <li> | ||||||||||||||
| <aside class="issue"> | ||||||||||||||
| Details of how to actually get the [=digital credential=] are | ||||||||||||||
|
|
@@ -917,6 +933,22 @@ <h3> | |||||||||||||
| </li> | ||||||||||||||
| </ol> | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the session's [=next wallet behavior=] is set: | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| <ol> | ||||||||||||||
| <li>If the mode is "respond", resolve the promise with a new | ||||||||||||||
| `DigitalCredential` object whose `data` member is set to the stored | ||||||||||||||
| `data`. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the mode is "wait", the promise never resolves. | ||||||||||||||
| </li> | ||||||||||||||
| <li>If the mode is "decline", reject the promise with a | ||||||||||||||
| "NotAllowedError" `DOMException`. | ||||||||||||||
| </li> | ||||||||||||||
| </ol> | ||||||||||||||
| </li> | ||||||||||||||
| <li>Otherwise (if [=next wallet behavior=] is not set), proceed with the | ||||||||||||||
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| normal user-interactive flow to select and use a digital credential. | ||||||||||||||
| </li> | ||||||||||||||
| <li> | ||||||||||||||
| <aside class="issue"> | ||||||||||||||
| Details of how to actually issue the [=digital credential=] are | ||||||||||||||
|
|
@@ -2141,6 +2173,268 @@ <h2> | |||||||||||||
| This section is a work in progress as this document evolves. | ||||||||||||||
| </p> | ||||||||||||||
| </section> | ||||||||||||||
| <section id="user-agent-automation" data-cite="webdriver"> | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: let ReSpec handle the id generation.
Suggested change
|
||||||||||||||
| <h2> | ||||||||||||||
| User Agent Automation | ||||||||||||||
| </h2> | ||||||||||||||
| <p> | ||||||||||||||
| For the purposes of user agent automation and web application testing, | ||||||||||||||
| this document defines a number of [[WebDriver]] [=extension commands=]. | ||||||||||||||
| </p> | ||||||||||||||
| <section id="webdriver-extension-capability"> | ||||||||||||||
| <h3> | ||||||||||||||
| Digital Credentials WebDriver Extension Capability | ||||||||||||||
| </h3> | ||||||||||||||
| <p> | ||||||||||||||
| In order to advertise the availability of [=extension commands=] | ||||||||||||||
| defined below, a new extension capability is defined. | ||||||||||||||
| </p> | ||||||||||||||
| <table class="data"> | ||||||||||||||
| <thead> | ||||||||||||||
| <tr> | ||||||||||||||
| <th> | ||||||||||||||
| Capability | ||||||||||||||
| </th> | ||||||||||||||
| <th> | ||||||||||||||
| Key | ||||||||||||||
| </th> | ||||||||||||||
| <th> | ||||||||||||||
| Value Type | ||||||||||||||
| </th> | ||||||||||||||
| <th> | ||||||||||||||
| Description | ||||||||||||||
| </th> | ||||||||||||||
| </tr> | ||||||||||||||
| </thead> | ||||||||||||||
| <tbody> | ||||||||||||||
| <tr> | ||||||||||||||
| <td> | ||||||||||||||
| Virtual Wallet Support | ||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed with @mohamedamir and drafted: 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||||||||||||||
| </td> | ||||||||||||||
| <td> | ||||||||||||||
| <code>digital-credentials:virtualWallet</code> | ||||||||||||||
|
||||||||||||||
| <code>digital-credentials:virtualWallet</code> | |
| <code>digital-credentials:virtualCredentialManager</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Indicates whether the endpoint node supports all Virtual Wallet | |
| Indicates whether the endpoint node supports all Virtual Credential Manager |
There was a problem hiding this comment.
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.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <code>digital-credentials:virtualWallet</code> with | |
| <code>digital-credentials:virtualCredentialManager</code> with |
mohamedamir marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <code>digital-credentials:virtualWallet</code> with | |
| <code>digital-credentials:virtualCredentialManager</code> with |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| not support any of the Virtual Wallet commands, the match is | |
| not support any of the Virtual Credential Manager commands, the match is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <section id="virtual-wallet-commands"> | |
| <section id="virtual-cm-commands"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best to avoid acronyms 🙏
There was a problem hiding this comment.
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 —
| <section id="virtual-wallet-commands"> | |
| <section id="virtual-cred-mgr-commands"> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
Outdated
There was a problem hiding this comment.
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.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <section id="set-wallet-response"> | |
| <h4> | |
| <dfn>Set Wallet Response</dfn> | |
| <section id="set-cm-response"> | |
| <h4> | |
| <dfn>Set Credential Manager Response</dfn> |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The [=Set Wallet Response=] [[WebDriver]] [=extension command=] | |
| The [=Set Credential Manager Response=] [[WebDriver]] [=extension command=] |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| configures the virtual wallet to respond with a specific data | |
| configures the virtual credential manager to respond with a specific data |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The data to be returned by the wallet. | |
| The data to be returned by the credential manager. |
Outdated
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <section id="set-wallet-to-wait"> | |
| <section id="set-cm-to-wait"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <dfn>Set Wallet to Wait</dfn> | |
| <dfn>Set Credential Manager to Wait</dfn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <li>Set the session's [=next wallet behavior=] to <code>{ "mode": | |
| <li>Set the session's [=next credential manager behavior=] to <code>{ "mode": |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <li>Set the session's [=next wallet behavior=] to <code>{ "mode": | |
| <li>Set the session's [=next credential manager behavior=] to <code>{ "mode": |
Uh oh!
There was an error while loading. Please reload this page.