Skip to content

Commit 7ad44ee

Browse files
committed
[java] add click dialog support to Federated Credential Management implementation
1 parent 328e241 commit 7ad44ee

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

java/src/org/openqa/selenium/remote/DriverCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public interface DriverCommand {
152152
// https://fedidcg.github.io/FedCM/#automation
153153
String CANCEL_DIALOG = "cancelDialog";
154154
String SELECT_ACCOUNT = "selectAccount";
155+
String CLICK_DIALOG = "clickDialog";
155156
String GET_ACCOUNTS = "getAccounts";
156157
String GET_FEDCM_TITLE = "getFedCmTitle";
157158
String GET_FEDCM_DIALOG_TYPE = "getFedCmDialogType";

java/src/org/openqa/selenium/remote/codec/AbstractHttpCommandCodec.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.openqa.selenium.remote.DriverCommand.ADD_VIRTUAL_AUTHENTICATOR;
2626
import static org.openqa.selenium.remote.DriverCommand.CANCEL_DIALOG;
2727
import static org.openqa.selenium.remote.DriverCommand.CLEAR_ELEMENT;
28+
import static org.openqa.selenium.remote.DriverCommand.CLICK_DIALOG;
2829
import static org.openqa.selenium.remote.DriverCommand.CLICK_ELEMENT;
2930
import static org.openqa.selenium.remote.DriverCommand.CLOSE;
3031
import static org.openqa.selenium.remote.DriverCommand.DELETE_ALL_COOKIES;
@@ -196,14 +197,14 @@ public AbstractHttpCommandCodec() {
196197
defineCommand(SET_USER_VERIFIED, post(webauthnId + "/uv"));
197198

198199
// Federated Credential Management API
199-
String fedcm = sessionId + "/fedcm";
200-
defineCommand(CANCEL_DIALOG, post(fedcm + "/canceldialog"));
201-
defineCommand(SELECT_ACCOUNT, post(fedcm + "/selectaccount"));
202-
defineCommand(GET_ACCOUNTS, get(fedcm + "/accountlist"));
203-
defineCommand(GET_FEDCM_TITLE, get(fedcm + "/gettitle"));
204-
defineCommand(GET_FEDCM_DIALOG_TYPE, get(fedcm + "/getdialogtype"));
205-
defineCommand(SET_DELAY_ENABLED, post(fedcm + "/setdelayenabled"));
206-
defineCommand(RESET_COOLDOWN, post(fedcm + "/resetCooldown"));
200+
defineCommand(CANCEL_DIALOG, post("/fedcm/canceldialog"));
201+
defineCommand(SELECT_ACCOUNT, post("/fedcm/selectaccount"));
202+
defineCommand(CLICK_DIALOG, post("/fedcm/clickdialogbutton"));
203+
defineCommand(GET_ACCOUNTS, get("/fedcm/accountlist"));
204+
defineCommand(GET_FEDCM_TITLE, get("/fedcm/gettitle"));
205+
defineCommand(GET_FEDCM_DIALOG_TYPE, get("/fedcm/getdialogtype"));
206+
defineCommand(SET_DELAY_ENABLED, post("/fedcm/setdelayenabled"));
207+
defineCommand(RESET_COOLDOWN, post("/fedcm/resetcooldown"));
207208

208209
defineCommand(GET_DOWNLOADABLE_FILES, get(sessionId + "/se/files"));
209210
defineCommand(DOWNLOAD_FILE, post(sessionId + "/se/files"));

0 commit comments

Comments
 (0)