We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f0fbf3 commit 8718f6cCopy full SHA for 8718f6c
javascript/node/selenium-webdriver/lib/command.js
@@ -188,14 +188,14 @@ const Name = {
188
189
// Federated Credential Management API
190
// https://www.w3.org/TR/fedcm/#automation
191
- CANCEL_DIALOG : 'cancelDialog',
192
- SELECT_ACCOUNT : 'selectAccount',
193
- GET_ACCOUNTS : 'getAccounts',
194
- GET_FEDCM_TITLE : 'getFedCmTitle',
195
- GET_FEDCM_DIALOG_TYPE : 'getFedCmDialogType',
196
- SET_DELAY_ENABLED : 'setDelayEnabled',
197
- RESET_COOLDOWN : 'resetCooldown',
198
- CLICK_DIALOG_BUTTON: 'clickdialogbutton'
+ CANCEL_DIALOG: 'cancelDialog',
+ SELECT_ACCOUNT: 'selectAccount',
+ GET_ACCOUNTS: 'getAccounts',
+ GET_FEDCM_TITLE: 'getFedCmTitle',
+ GET_FEDCM_DIALOG_TYPE: 'getFedCmDialogType',
+ SET_DELAY_ENABLED: 'setDelayEnabled',
+ RESET_COOLDOWN: 'resetCooldown',
+ CLICK_DIALOG_BUTTON: 'clickdialogbutton',
199
}
200
201
/**
javascript/node/selenium-webdriver/lib/fedcm/account.js
@@ -21,16 +21,17 @@ const LoginState = {
21
22
23
class Account {
24
-
25
- constructor(accountId,
26
- email,
27
- name,
28
- givenName,
29
- pictureUrl,
30
- idpConfigUrl,
31
- loginState,
32
- termsOfServiceUrl,
33
- privacyPolicyUrl ) {
+ constructor(
+ accountId,
+ email,
+ name,
+ givenName,
+ pictureUrl,
+ idpConfigUrl,
+ loginState,
+ termsOfServiceUrl,
+ privacyPolicyUrl,
34
+ ) {
35
this._accountId = accountId
36
this._email = email
37
this._name = name
@@ -77,4 +78,4 @@ class Account {
77
78
get privacyPolicyUrl() {
79
return this._privacyPolicyUrl
80
-}
81
+}
javascript/node/selenium-webdriver/lib/fedcm/dialog.js
@@ -23,44 +23,36 @@ const LoginState = {
class Dialog {
constructor(driver) {
this._driver = driver
async title() {
- const result = await this._driver.execute(
- new command.Command(command.Name.GET_FEDCM_TITLE))
+ const result = await this._driver.execute(new command.Command(command.Name.GET_FEDCM_TITLE))
return result.title
38
subtitle() {
39
- return this._driver.execute(
40
+ return this._driver.execute(new command.Command(command.Name.GET_FEDCM_TITLE))
41
42
43
type() {
44
45
- new command.Command(command.Name.GET_FEDCM_DIALOG_TYPE))
+ return this._driver.execute(new command.Command(command.Name.GET_FEDCM_DIALOG_TYPE))
46
47
48
accounts() {
49
50
- const result = this._driver.execute(new command.Command(command.Name.GET_ACCOUNTS))
+ const result = this._driver.execute(new command.Command(command.Name.GET_ACCOUNTS))
51
52
return result
53
54
55
selectAccount(index) {
56
57
- new command.Command(command.Name.SELECT_ACCOUNT).setParameter(
58
- 'accountIndex', index))
+ return this._driver.execute(new command.Command(command.Name.SELECT_ACCOUNT).setParameter('accountIndex', index))
59
60
61
accept() {
62
63
- new command.Command(command.Name.CLICK_DIALOG_BUTTON))
+ return this._driver.execute(new command.Command(command.Name.CLICK_DIALOG_BUTTON))
64
65
66
dismiss() {
@@ -69,5 +61,5 @@ class Dialog {
69
70
71
module.exports = {
72
- Dialog
73
+ Dialog,
javascript/node/selenium-webdriver/lib/http.js
@@ -325,12 +325,12 @@ const W3C_COMMAND_MAP = new Map([
325
[cmd.Name.CANCEL_DIALOG, post(`/session/:sessionId/fedcm/canceldialog`)],
326
[cmd.Name.SELECT_ACCOUNT, post(`/session/:sessionId/fedcm/selectaccount`)],
327
[cmd.Name.GET_FEDCM_TITLE, get(`/session/:sessionId/fedcm/gettitle`)],
328
- [cmd.Name.GET_FEDCM_DIALOG_TYPE , get('/session/:sessionId/fedcm/getdialogtype')],
329
- [cmd.Name.SET_DELAY_ENABLED,post(`/session/:sessionId/fedcm/setdelayenabled`)],
+ [cmd.Name.GET_FEDCM_DIALOG_TYPE, get('/session/:sessionId/fedcm/getdialogtype')],
+ [cmd.Name.SET_DELAY_ENABLED, post(`/session/:sessionId/fedcm/setdelayenabled`)],
330
[cmd.Name.RESET_COOLDOWN, post(`/session/:sessionId/fedcm/resetcooldown`)],
331
[cmd.Name.CLICK_DIALOG_BUTTON, post(`/session/:sessionId/fedcm/clickdialogbutton`)],
332
- [cmd.Name.GET_ACCOUNTS, get(`/session/:sessionId/fedcm/accountlist`)]
333
- ])
+ [cmd.Name.GET_ACCOUNTS, get(`/session/:sessionId/fedcm/accountlist`)],
+])
334
335
336
* Handles sending HTTP messages to a remote end.
javascript/node/selenium-webdriver/lib/webdriver.js
@@ -1116,10 +1116,9 @@ class WebDriver {
1116
1117
1118
getFederalCredentialManagementDialog() {
1119
- return new Dialog.Dialog(this)
+ return new Dialog.Dialog(this)
1120
1121
1122
1123
/** @override */
1124
manage() {
1125
return new Options(this)
0 commit comments