Class: Selenium::WebDriver::HTML5::LocalStorage
- Inherits:
-
Object
- Object
- Selenium::WebDriver::HTML5::LocalStorage
show all
- Includes:
- SharedWebStorage
- Defined in:
- lib/selenium/webdriver/common/html5/local_storage.rb
Instance Method Summary
collapse
#each, #empty?, #fetch, #key?
Constructor Details
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 LocalStorage.
27
28
29
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 27
def initialize(bridge)
@bridge = bridge
end
|
Instance Method Details
#[](key) ⇒ Object
31
32
33
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 31
def [](key)
@bridge.local_storage_item key
end
|
#[]=(key, value) ⇒ Object
35
36
37
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 35
def []=(key, value)
@bridge.local_storage_item key, value
end
|
#clear ⇒ Object
43
44
45
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 43
def clear
@bridge.clear_local_storage
end
|
#delete(key) ⇒ Object
39
40
41
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 39
def delete(key)
@bridge.remove_local_storage_item key
end
|
#keys ⇒ Object
51
52
53
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 51
def keys
@bridge.local_storage_keys.reverse
end
|
#size ⇒ Object
47
48
49
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 47
def size
@bridge.local_storage_size
end
|