Class: Selenium::WebDriver::BiDi::Credentials Private

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/network/credentials.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username: nil, password: nil) ⇒ Credentials

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Credentials.



30
31
32
33
# File 'lib/selenium/webdriver/bidi/network/credentials.rb', line 30

def initialize(username: nil, password: nil)
  @username = username
  @password = password
end

Instance Attribute Details

#passwordObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



28
29
30
# File 'lib/selenium/webdriver/bidi/network/credentials.rb', line 28

def password
  @password
end

#usernameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



28
29
30
# File 'lib/selenium/webdriver/bidi/network/credentials.rb', line 28

def username
  @username
end

Instance Method Details

#as_jsonObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



35
36
37
38
39
40
41
42
43
# File 'lib/selenium/webdriver/bidi/network/credentials.rb', line 35

def as_json
  return nil unless username && password

  {
    type: 'password',
    username: username,
    password: password
  }
end