Skip to content

Specify the webdriver command to open terms of service and privacy po… - #610

Open
cbiesinger wants to merge 1 commit into
w3c-fedid:mainfrom
cbiesinger:webdriver2
Open

Specify the webdriver command to open terms of service and privacy po…#610
cbiesinger wants to merge 1 commit into
w3c-fedid:mainfrom
cbiesinger:webdriver2

Conversation

@cbiesinger

@cbiesinger cbiesinger commented May 30, 2024

Copy link
Copy Markdown
Collaborator

…licy

Fixes #627


Preview | Diff

@cbiesinger
cbiesinger requested a review from npm1 May 30, 2024 21:02
cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 3, 2024
This builds on commit 7ad44ee

The specification for clickdialogbutton is here:
https://fedidcg.github.io/FedCM/#webdriver-clickdialogbutton

The version that takes an index is specified here:
w3c-fedid/FedCM#610

Bug SeleniumHQ#12088

@npm1 npm1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

Comment thread spec/index.bs
1. If |dialogButton| is "`TermsOfService`" or "`PrivacyPolicy`":
1. If no FedCM dialog is currently open or the dialog is not a dialog that
lets a user select an account, return a [=error|WebDriver error=] with
[=error code=] [=no such alert=].

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this the right error code?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's the code I've been using for all the webdriver commands. It seemed close enough and I wanted to avoid defining a new error code.

Comment thread spec/index.bs Outdated
Comment thread spec/index.bs Outdated

@samuelgoto samuelgoto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM++

cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 4, 2024
This builds on commit 7ad44ee

The specification for clickdialogbutton is here:
https://fedidcg.github.io/FedCM/#webdriver-clickdialogbutton

The version that takes an index is specified here:
w3c-fedid/FedCM#610

Bug SeleniumHQ#12088
cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 4, 2024
This builds on commit 7ad44ee

The specification for clickdialogbutton is here:
https://fedidcg.github.io/FedCM/#webdriver-clickdialogbutton

The version that takes an index is specified here:
w3c-fedid/FedCM#610

Bug SeleniumHQ#12088
cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 4, 2024
This builds on commit 7ad44ee

The specification for clickdialogbutton is here:
https://fedidcg.github.io/FedCM/#webdriver-clickdialogbutton

The version that takes an index is specified here:
w3c-fedid/FedCM#610

Bug SeleniumHQ#12088
cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 5, 2024
This builds on commit 7ad44ee

The specification for clickdialogbutton is here:
https://fedidcg.github.io/FedCM/#webdriver-clickdialogbutton

The version that takes an index is specified here:
w3c-fedid/FedCM#610

Bug SeleniumHQ#12088

@npm1 npm1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure what was the recent change but lgtm

@cbiesinger

Copy link
Copy Markdown
Collaborator Author

The change was reformatting and also changing the error to invalid selector (from invalid argument) here:

    1. If the account at |index| does not have a terms of service or privacy
        policy URL, either because none was provided in the [=client metadata
        endpoint=] or because [=compute the connection status=] for the account
        returned [=compute the connection status/connected=], return a
        [=error|WebDriver error=] with [=error code=] [=invalid selector=].

@cbiesinger

Copy link
Copy Markdown
Collaborator Author

@bvandersloot-mozilla could you take a look?

@TallTed TallTed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Multiple "if" conditions deserve the clarity of a "then"

Comment thread spec/index.bs
Comment on lines +2203 to +2206
1. If |index| is not an integer, or is less than zero or greater than
or equal to the number of accounts that the user can choose from in the
current flow, return a [=error|WebDriver error=] with [=error code=]
[=invalid argument=].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. If |index| is not an integer, or is less than zero or greater than
or equal to the number of accounts that the user can choose from in the
current flow, return a [=error|WebDriver error=] with [=error code=]
[=invalid argument=].
1. If |index| is not an integer, or is less than zero, or is greater than
or equal to the number of accounts that the user can choose from in the
current flow, then return a [=error|WebDriver error=] with [=error code=]
[=invalid argument=].

Comment thread spec/index.bs
Comment on lines +2207 to +2214
1. If the account at |index| does not have a terms of service or privacy
policy URL, either because none was provided in the [=client metadata
endpoint=] or because [=compute the connection status=] for the account
returned [=compute the connection status/connected=], return a
[=error|WebDriver error=] with [=error code=] [=invalid selector=].
1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
{{IdentityProviderClientMetadata/terms_of_service_url}}, or if
|dialogButton| is "`PrivacyPolicy`", open the account's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. If the account at |index| does not have a terms of service or privacy
policy URL, either because none was provided in the [=client metadata
endpoint=] or because [=compute the connection status=] for the account
returned [=compute the connection status/connected=], return a
[=error|WebDriver error=] with [=error code=] [=invalid selector=].
1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
{{IdentityProviderClientMetadata/terms_of_service_url}}, or if
|dialogButton| is "`PrivacyPolicy`", open the account's
1. If the account at |index| does not have a terms of service or privacy
policy URL, either because none was provided in the [=client metadata
endpoint=] or because [=compute the connection status=] for the account
returned [=compute the connection status/connected=], then return a
[=error|WebDriver error=] with [=error code=] [=invalid selector=].
1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
{{IdentityProviderClientMetadata/terms_of_service_url}}, or if
|dialogButton| is "`PrivacyPolicy`", then open the account's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Add webdriver command to open PP/TOS

5 participants