Class: Selenium::DevTools::V131::CacheStorage
- Inherits:
-
Object
- Object
- Selenium::DevTools::V131::CacheStorage
- Defined in:
- lib/selenium/devtools/v131/cache_storage.rb
Instance Method Summary collapse
- #delete_cache(cache_id:) ⇒ Object
- #delete_entry(cache_id:, request:) ⇒ Object
-
#initialize(devtools) ⇒ CacheStorage
constructor
A new instance of CacheStorage.
- #on(event, &block) ⇒ Object
- #request_cache_names(security_origin: nil, storage_key: nil, storage_bucket: nil) ⇒ Object
- #request_cached_response(cache_id:, request_url:, request_headers:) ⇒ Object
- #request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ CacheStorage
Returns a new instance of CacheStorage.
26 27 28 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 26 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#delete_cache(cache_id:) ⇒ Object
35 36 37 38 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 35 def delete_cache(cache_id:) @devtools.send_cmd('CacheStorage.deleteCache', cacheId: cache_id) end |
#delete_entry(cache_id:, request:) ⇒ Object
40 41 42 43 44 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 40 def delete_entry(cache_id:, request:) @devtools.send_cmd('CacheStorage.deleteEntry', cacheId: cache_id, request: request) end |
#on(event, &block) ⇒ Object
30 31 32 33 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["CacheStorage.#{event}"] << block end |
#request_cache_names(security_origin: nil, storage_key: nil, storage_bucket: nil) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 46 def request_cache_names(security_origin: nil, storage_key: nil, storage_bucket: nil) @devtools.send_cmd('CacheStorage.requestCacheNames', securityOrigin: security_origin, storageKey: storage_key, storageBucket: storage_bucket) end |
#request_cached_response(cache_id:, request_url:, request_headers:) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 53 def request_cached_response(cache_id:, request_url:, request_headers:) @devtools.send_cmd('CacheStorage.requestCachedResponse', cacheId: cache_id, requestURL: request_url, requestHeaders: request_headers) end |
#request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/selenium/devtools/v131/cache_storage.rb', line 60 def request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil) @devtools.send_cmd('CacheStorage.requestEntries', cacheId: cache_id, skipCount: skip_count, pageSize: page_size, pathFilter: path_filter) end |