Skip to content

Commit

Permalink
Change confirm IDP login webdriver command to click dialog button (#510)
Browse files Browse the repository at this point in the history
* Change confirm IDP login webdriver command to click dialog button

* Change confirm IDP login webdriver command to click dialog button

* Remove error API references

* Add commas

* Address npm's comments
  • Loading branch information
tttzach authored Nov 29, 2023
1 parent 78499af commit 75a6d4a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,9 +1985,9 @@ The [=remote end steps=] are:

1. Return [=success=] with data `null`.

## Confirm IDP login ## {#webdriver-confirmidplogin}
## Click dialog button ## {#webdriver-clickdialogbutton}

<figure id="table-webdriver-confirmidplogin" class="table">
<figure id="table-webdriver-clickdialogbutton" class="table">
<table class="data">
<thead>
<tr>
Expand All @@ -1998,20 +1998,29 @@ The [=remote end steps=] are:
<tbody>
<tr>
<td>POST</td>
<td>`/session/{session id}/fedcm/confirmidplogin`</td>
<td>`/session/{session id}/fedcm/clickdialogbutton`</td>
</tr>
</tbody>
</table>
</figure>

The [=remote end steps=] are:

1. If no FedCM dialog is currently open, or the dialog is not a [=confirm IDP
login dialog=] return a [=error|WebDriver error=] with [=error code=]
[=no such alert=].
1. If |parameters| is not a JSON [[ECMASCRIPT#sec-json-object|Object]], return a
[=error|WebDriver error=] with [=error code=] [=invalid argument=].

1. Let |dialogButton| be the result of [=getting a property=] named
`"dialogButton"` from |parameters|.

1. If |dialogButton| is not a string that is "`ConfirmIdpLoginContinue`", return
a [=error|WebDriver error=] with [=error code=] [=invalid argument=].

1. If no FedCM dialog is currently open or the dialog is not a [=confirm IDP
login dialog=], return a [=error|WebDriver error=] with [=error code=] [=no
such alert=].

1. Act as if the user had clicked the "continue" button in the dialog and
initiate the login flow.
1. Act as if the user had clicked the "continue" button in the [=confirm IDP
login dialog=] and initiate the login flow.

1. Return [=success=] with data `null`.

Expand Down

0 comments on commit 75a6d4a

Please sign in to comment.