Class: Selenium::WebDriver::HTML5::LocalStorage
- Inherits:
-
Object
- Object
- Selenium::WebDriver::HTML5::LocalStorage
show all
- Includes:
- SharedWebStorage
- Defined in:
- rb/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.
29
30
31
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 29
def initialize(bridge)
@bridge = bridge
end
|
Instance Method Details
#[](key) ⇒ Object
33
34
35
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 33
def [](key)
@bridge.local_storage_item key
end
|
#[]=(key, value) ⇒ Object
37
38
39
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 37
def []=(key, value)
@bridge.local_storage_item key, value
end
|
#clear ⇒ Object
45
46
47
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 45
def clear
@bridge.clear_local_storage
end
|
#delete(key) ⇒ Object
41
42
43
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 41
def delete(key)
@bridge.remove_local_storage_item key
end
|
#keys ⇒ Object
53
54
55
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 53
def keys
@bridge.local_storage_keys.reverse
end
|
#size ⇒ Object
49
50
51
|
# File 'rb/lib/selenium/webdriver/common/html5/local_storage.rb', line 49
def size
@bridge.local_storage_size
end
|