Class: Selenium::WebDriver::BiDi::Cookies

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

Instance Method Summary collapse

Constructor Details

#initialize(cookies = {}) ⇒ Cookies

Returns a new instance of Cookies.



24
25
26
27
# File 'rb/lib/selenium/webdriver/bidi/network/cookies.rb', line 24

def initialize(cookies = {})
  super()
  merge!(cookies)
end

Instance Method Details

#as_jsonObject



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

def as_json
  self[:name] = self[:name].to_s
  self[:value] = {type: 'string', value: self[:value].to_s}

  [compact]
end