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.
11
12
13
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 11
def initialize(bridge)
@bridge = bridge
end
|
Instance Method Details
#[](key) ⇒ Object
15
16
17
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 15
def [](key)
@bridge.getLocalStorageItem key
end
|
#[]=(key, value) ⇒ Object
19
20
21
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 19
def []=(key, value)
@bridge.setLocalStorageItem key, value
end
|
#clear ⇒ Object
27
28
29
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 27
def clear
@bridge.clearLocalStorage
end
|
#delete(key) ⇒ Object
23
24
25
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 23
def delete(key)
@bridge.removeLocalStorageItem key
end
|
#keys ⇒ Object
35
36
37
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 35
def keys
@bridge.getLocalStorageKeys.reverse
end
|
#size ⇒ Object
31
32
33
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 31
def size
@bridge.getLocalStorageSize
end
|