Class: Selenium::WebDriver::HTML5::SessionStorage

Inherits:
Object
  • Object
show all
Includes:
Enumerable, SharedWebStorage
Defined in:
lib/selenium/webdriver/common/html5/session_storage.rb

Instance Method Summary collapse

Methods included from SharedWebStorage

#each, #empty?, #fetch, #key?

Constructor Details

#initialize(bridge) ⇒ SessionStorage

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 SessionStorage.



55
56
57
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 55

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#[](key) ⇒ Object



27
28
29
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 27

def [](key)
  @bridge.session_storage_item key
end

#[]=(key, value) ⇒ Object



31
32
33
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 31

def []=(key, value)
  @bridge.session_storage_item key, value
end

#clearObject



39
40
41
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 39

def clear
  @bridge.clear_session_storage
end

#delete(key) ⇒ Object



35
36
37
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 35

def delete(key)
  @bridge.remove_session_storage_item key
end

#keysObject



47
48
49
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 47

def keys
  @bridge.session_storage_keys.reverse
end

#sizeObject



43
44
45
# File 'lib/selenium/webdriver/common/html5/session_storage.rb', line 43

def size
  @bridge.session_storage_size
end