From 75a6d4a18229903e7cf806e75fd3de942457eae8 Mon Sep 17 00:00:00 2001 From: Zachary Tan Date: Wed, 29 Nov 2023 09:58:11 -0500 Subject: [PATCH] Change confirm IDP login webdriver command to click dialog button (#510) * 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 --- spec/index.bs | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/spec/index.bs b/spec/index.bs index a8318d27..f160f4ec 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -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} -
+
@@ -1998,7 +1998,7 @@ The [=remote end steps=] are: - +
POST`/session/{session id}/fedcm/confirmidplogin``/session/{session id}/fedcm/clickdialogbutton`
@@ -2006,12 +2006,21 @@ The [=remote end steps=] are: 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`.