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.
30
31
32
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 30
def initialize(bridge)
@bridge = bridge
end
|
Instance Method Details
#[](key) ⇒ Object
34
35
36
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 34
def [](key)
@bridge.getLocalStorageItem key
end
|
#[]=(key, value) ⇒ Object
38
39
40
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 38
def []=(key, value)
@bridge.setLocalStorageItem key, value
end
|
#clear ⇒ Object
46
47
48
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 46
def clear
@bridge.clearLocalStorage
end
|
#delete(key) ⇒ Object
42
43
44
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 42
def delete(key)
@bridge.removeLocalStorageItem key
end
|
#keys ⇒ Object
54
55
56
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 54
def keys
@bridge.getLocalStorageKeys.reverse
end
|
#size ⇒ Object
50
51
52
|
# File 'lib/selenium/webdriver/common/html5/local_storage.rb', line 50
def size
@bridge.getLocalStorageSize
end
|