Class: Selenium::WebDriver::FedCM::Dialog
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rb/lib/selenium/webdriver/common/fedcm/dialog.rb |
Constant Summary
-
DIALOG_TYPE_ACCOUNT_LIST =
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 28'AccountChooser'
-
DIALOG_TYPE_AUTO_REAUTH =
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 29'AutoReauthn'
Class Method Summary
- .new(bridge) ⇒ Dialog constructor
Instance Method Summary
-
#accounts
Returns the accounts shown in the account chooser.
-
#cancel
Closes the dialog as if the user had clicked X.
-
#click
Closes the dialog as if the user had clicked X.
-
#select_account(index)
Selects an account as if the user had clicked on it.
-
#subtitle
Returns the subtitle of the dialog or nil if none.
-
#title
Returns the title of the dialog.
-
#type
Returns the type of the open dialog.
Constructor Details
.new(bridge) ⇒ Dialog
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 24
def initialize(bridge) @bridge = bridge end
Instance Method Details
#accounts
Returns the accounts shown in the account chooser.
If this is an auto reauth dialog, returns the single account that is being signed in.
#cancel
Closes the dialog as if the user had clicked X.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 37
def cancel @bridge.cancel_fedcm_dialog end
#click
Closes the dialog as if the user had clicked X.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 32
def click @bridge. end
#select_account(index)
Selects an account as if the user had clicked on it.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 44
def select_account(index) @bridge.select_fedcm_account index end
#subtitle
Returns the subtitle of the dialog or nil if none.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 61
def subtitle @bridge.fedcm_subtitle end
#title
Returns the title of the dialog.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 56
def title @bridge.fedcm_title end
#type
Returns the type of the open dialog.
One of DIALOG_TYPE_ACCOUNT_LIST and DIALOG_TYPE_AUTO_REAUTH.
# File 'rb/lib/selenium/webdriver/common/fedcm/dialog.rb', line 51
def type @bridge.fedcm_dialog_type end