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