Class: Selenium::WebDriver::VirtualAuthenticator
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb |
Class Method Summary
-
.new(bridge, authenticator_id, options) ⇒ VirtualAuthenticator
constructor
api private Use Driver#add_virtual_authenticator
Instance Attribute Summary
- #options readonly
- #user_verified=(verified) writeonly
- #valid? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(bridge, authenticator_id, options) ⇒ VirtualAuthenticator
api private Use Driver#add_virtual_authenticator
# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 30
def initialize(bridge, authenticator_id, ) @id = authenticator_id @bridge = bridge @options = @valid = true end
Instance Attribute Details
#options (readonly)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 23
attr_reader :
#user_verified=(verified) (writeonly)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 58
def user_verified=(verified) @bridge.user_verified verified, @id end
#valid? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 67
def valid? @valid end
Instance Method Details
#add_credential(credential)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 37
def add_credential(credential) credential = credential.as_json @bridge.add_credential credential, @id end
#credentials
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 42
def credentials credential_data = @bridge.credentials @id credential_data.map do |cred| Credential.from_json(cred) end end
#remove!
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 62
def remove! @bridge.remove_virtual_authenticator(@id) @valid = false end
#remove_all_credentials
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 54
def remove_all_credentials @bridge.remove_all_credentials @id end
#remove_credential(credential_id)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/virtual_authenticator/virtual_authenticator.rb', line 49
def remove_credential(credential_id) credential_id = Credential.encode(credential_id) if credential_id.instance_of?(Array) @bridge.remove_credential credential_id, @id end