Class: Selenium::DevTools::V129::Storage
- Inherits:
-
Object
- Object
- Selenium::DevTools::V129::Storage
- Defined in:
- lib/selenium/devtools/v129/storage.rb
Constant Summary collapse
- EVENTS =
{ cache_storage_content_updated: 'cacheStorageContentUpdated', cache_storage_list_updated: 'cacheStorageListUpdated', indexed_db_content_updated: 'indexedDBContentUpdated', indexed_db_list_updated: 'indexedDBListUpdated', interest_group_accessed: 'interestGroupAccessed', interest_group_auction_event_occurred: 'interestGroupAuctionEventOccurred', interest_group_auction_network_request_created: 'interestGroupAuctionNetworkRequestCreated', shared_storage_accessed: 'sharedStorageAccessed', storage_bucket_created_or_updated: 'storageBucketCreatedOrUpdated', storage_bucket_deleted: 'storageBucketDeleted', attribution_reporting_source_registered: 'attributionReportingSourceRegistered', attribution_reporting_trigger_registered: 'attributionReportingTriggerRegistered', }.freeze
Instance Method Summary collapse
- #clear_cookies(browser_context_id: nil) ⇒ Object
- #clear_data_for_origin(origin:, storage_types:) ⇒ Object
- #clear_data_for_storage_key(storage_key:, storage_types:) ⇒ Object
- #clear_shared_storage_entries(owner_origin:) ⇒ Object
- #clear_trust_tokens(issuer_origin:) ⇒ Object
- #delete_shared_storage_entry(owner_origin:, key:) ⇒ Object
- #delete_storage_bucket(bucket:) ⇒ Object
- #get_cookies(browser_context_id: nil) ⇒ Object
- #get_interest_group_details(owner_origin:, name:) ⇒ Object
- #get_related_website_sets ⇒ Object
- #get_shared_storage_entries(owner_origin:) ⇒ Object
- #get_shared_storage_metadata(owner_origin:) ⇒ Object
- #get_storage_key_for_frame(frame_id:) ⇒ Object
- #get_trust_tokens ⇒ Object
- #get_usage_and_quota(origin:) ⇒ Object
-
#initialize(devtools) ⇒ Storage
constructor
A new instance of Storage.
- #on(event, &block) ⇒ Object
- #override_quota_for_origin(origin:, quota_size: nil) ⇒ Object
- #reset_shared_storage_budget(owner_origin:) ⇒ Object
- #run_bounce_tracking_mitigations ⇒ Object
- #send_pending_attribution_reports ⇒ Object
- #set_attribution_reporting_local_testing_mode(enabled:) ⇒ Object
- #set_attribution_reporting_tracking(enable:) ⇒ Object
- #set_cookies(cookies:, browser_context_id: nil) ⇒ Object
- #set_interest_group_auction_tracking(enable:) ⇒ Object
- #set_interest_group_tracking(enable:) ⇒ Object
- #set_shared_storage_entry(owner_origin:, key:, value:, ignore_if_present: nil) ⇒ Object
- #set_shared_storage_tracking(enable:) ⇒ Object
- #set_storage_bucket_tracking(storage_key:, enable:) ⇒ Object
- #track_cache_storage_for_origin(origin:) ⇒ Object
- #track_cache_storage_for_storage_key(storage_key:) ⇒ Object
- #track_indexed_db_for_origin(origin:) ⇒ Object
- #track_indexed_db_for_storage_key(storage_key:) ⇒ Object
- #untrack_cache_storage_for_origin(origin:) ⇒ Object
- #untrack_cache_storage_for_storage_key(storage_key:) ⇒ Object
- #untrack_indexed_db_for_origin(origin:) ⇒ Object
- #untrack_indexed_db_for_storage_key(storage_key:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Storage
Returns a new instance of Storage.
40 41 42 |
# File 'lib/selenium/devtools/v129/storage.rb', line 40 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#clear_cookies(browser_context_id: nil) ⇒ Object
77 78 79 80 |
# File 'lib/selenium/devtools/v129/storage.rb', line 77 def (browser_context_id: nil) @devtools.send_cmd('Storage.clearCookies', browserContextId: browser_context_id) end |
#clear_data_for_origin(origin:, storage_types:) ⇒ Object
54 55 56 57 58 |
# File 'lib/selenium/devtools/v129/storage.rb', line 54 def clear_data_for_origin(origin:, storage_types:) @devtools.send_cmd('Storage.clearDataForOrigin', origin: origin, storageTypes: storage_types) end |
#clear_data_for_storage_key(storage_key:, storage_types:) ⇒ Object
60 61 62 63 64 |
# File 'lib/selenium/devtools/v129/storage.rb', line 60 def clear_data_for_storage_key(storage_key:, storage_types:) @devtools.send_cmd('Storage.clearDataForStorageKey', storageKey: storage_key, storageTypes: storage_types) end |
#clear_shared_storage_entries(owner_origin:) ⇒ Object
182 183 184 185 |
# File 'lib/selenium/devtools/v129/storage.rb', line 182 def clear_shared_storage_entries(owner_origin:) @devtools.send_cmd('Storage.clearSharedStorageEntries', ownerOrigin: owner_origin) end |
#clear_trust_tokens(issuer_origin:) ⇒ Object
137 138 139 140 |
# File 'lib/selenium/devtools/v129/storage.rb', line 137 def clear_trust_tokens(issuer_origin:) @devtools.send_cmd('Storage.clearTrustTokens', issuerOrigin: issuer_origin) end |
#delete_shared_storage_entry(owner_origin:, key:) ⇒ Object
176 177 178 179 180 |
# File 'lib/selenium/devtools/v129/storage.rb', line 176 def delete_shared_storage_entry(owner_origin:, key:) @devtools.send_cmd('Storage.deleteSharedStorageEntry', ownerOrigin: owner_origin, key: key) end |
#delete_storage_bucket(bucket:) ⇒ Object
203 204 205 206 |
# File 'lib/selenium/devtools/v129/storage.rb', line 203 def delete_storage_bucket(bucket:) @devtools.send_cmd('Storage.deleteStorageBucket', bucket: bucket) end |
#get_cookies(browser_context_id: nil) ⇒ Object
66 67 68 69 |
# File 'lib/selenium/devtools/v129/storage.rb', line 66 def (browser_context_id: nil) @devtools.send_cmd('Storage.getCookies', browserContextId: browser_context_id) end |
#get_interest_group_details(owner_origin:, name:) ⇒ Object
142 143 144 145 146 |
# File 'lib/selenium/devtools/v129/storage.rb', line 142 def get_interest_group_details(owner_origin:, name:) @devtools.send_cmd('Storage.getInterestGroupDetails', ownerOrigin: owner_origin, name: name) end |
#get_related_website_sets ⇒ Object
226 227 228 |
# File 'lib/selenium/devtools/v129/storage.rb', line 226 def @devtools.send_cmd('Storage.getRelatedWebsiteSets') end |
#get_shared_storage_entries(owner_origin:) ⇒ Object
163 164 165 166 |
# File 'lib/selenium/devtools/v129/storage.rb', line 163 def get_shared_storage_entries(owner_origin:) @devtools.send_cmd('Storage.getSharedStorageEntries', ownerOrigin: owner_origin) end |
#get_shared_storage_metadata(owner_origin:) ⇒ Object
158 159 160 161 |
# File 'lib/selenium/devtools/v129/storage.rb', line 158 def (owner_origin:) @devtools.send_cmd('Storage.getSharedStorageMetadata', ownerOrigin: owner_origin) end |
#get_storage_key_for_frame(frame_id:) ⇒ Object
49 50 51 52 |
# File 'lib/selenium/devtools/v129/storage.rb', line 49 def get_storage_key_for_frame(frame_id:) @devtools.send_cmd('Storage.getStorageKeyForFrame', frameId: frame_id) end |
#get_trust_tokens ⇒ Object
133 134 135 |
# File 'lib/selenium/devtools/v129/storage.rb', line 133 def get_trust_tokens @devtools.send_cmd('Storage.getTrustTokens') end |
#get_usage_and_quota(origin:) ⇒ Object
82 83 84 85 |
# File 'lib/selenium/devtools/v129/storage.rb', line 82 def get_usage_and_quota(origin:) @devtools.send_cmd('Storage.getUsageAndQuota', origin: origin) end |
#on(event, &block) ⇒ Object
44 45 46 47 |
# File 'lib/selenium/devtools/v129/storage.rb', line 44 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Storage.#{event}"] << block end |
#override_quota_for_origin(origin:, quota_size: nil) ⇒ Object
87 88 89 90 91 |
# File 'lib/selenium/devtools/v129/storage.rb', line 87 def override_quota_for_origin(origin:, quota_size: nil) @devtools.send_cmd('Storage.overrideQuotaForOrigin', origin: origin, quotaSize: quota_size) end |
#reset_shared_storage_budget(owner_origin:) ⇒ Object
187 188 189 190 |
# File 'lib/selenium/devtools/v129/storage.rb', line 187 def reset_shared_storage_budget(owner_origin:) @devtools.send_cmd('Storage.resetSharedStorageBudget', ownerOrigin: owner_origin) end |
#run_bounce_tracking_mitigations ⇒ Object
208 209 210 |
# File 'lib/selenium/devtools/v129/storage.rb', line 208 def run_bounce_tracking_mitigations @devtools.send_cmd('Storage.runBounceTrackingMitigations') end |
#send_pending_attribution_reports ⇒ Object
222 223 224 |
# File 'lib/selenium/devtools/v129/storage.rb', line 222 def send_pending_attribution_reports @devtools.send_cmd('Storage.sendPendingAttributionReports') end |
#set_attribution_reporting_local_testing_mode(enabled:) ⇒ Object
212 213 214 215 |
# File 'lib/selenium/devtools/v129/storage.rb', line 212 def set_attribution_reporting_local_testing_mode(enabled:) @devtools.send_cmd('Storage.setAttributionReportingLocalTestingMode', enabled: enabled) end |
#set_attribution_reporting_tracking(enable:) ⇒ Object
217 218 219 220 |
# File 'lib/selenium/devtools/v129/storage.rb', line 217 def set_attribution_reporting_tracking(enable:) @devtools.send_cmd('Storage.setAttributionReportingTracking', enable: enable) end |
#set_cookies(cookies:, browser_context_id: nil) ⇒ Object
71 72 73 74 75 |
# File 'lib/selenium/devtools/v129/storage.rb', line 71 def (cookies:, browser_context_id: nil) @devtools.send_cmd('Storage.setCookies', cookies: , browserContextId: browser_context_id) end |
#set_interest_group_auction_tracking(enable:) ⇒ Object
153 154 155 156 |
# File 'lib/selenium/devtools/v129/storage.rb', line 153 def set_interest_group_auction_tracking(enable:) @devtools.send_cmd('Storage.setInterestGroupAuctionTracking', enable: enable) end |
#set_interest_group_tracking(enable:) ⇒ Object
148 149 150 151 |
# File 'lib/selenium/devtools/v129/storage.rb', line 148 def set_interest_group_tracking(enable:) @devtools.send_cmd('Storage.setInterestGroupTracking', enable: enable) end |
#set_shared_storage_entry(owner_origin:, key:, value:, ignore_if_present: nil) ⇒ Object
168 169 170 171 172 173 174 |
# File 'lib/selenium/devtools/v129/storage.rb', line 168 def set_shared_storage_entry(owner_origin:, key:, value:, ignore_if_present: nil) @devtools.send_cmd('Storage.setSharedStorageEntry', ownerOrigin: owner_origin, key: key, value: value, ignoreIfPresent: ignore_if_present) end |
#set_shared_storage_tracking(enable:) ⇒ Object
192 193 194 195 |
# File 'lib/selenium/devtools/v129/storage.rb', line 192 def set_shared_storage_tracking(enable:) @devtools.send_cmd('Storage.setSharedStorageTracking', enable: enable) end |
#set_storage_bucket_tracking(storage_key:, enable:) ⇒ Object
197 198 199 200 201 |
# File 'lib/selenium/devtools/v129/storage.rb', line 197 def set_storage_bucket_tracking(storage_key:, enable:) @devtools.send_cmd('Storage.setStorageBucketTracking', storageKey: storage_key, enable: enable) end |
#track_cache_storage_for_origin(origin:) ⇒ Object
93 94 95 96 |
# File 'lib/selenium/devtools/v129/storage.rb', line 93 def track_cache_storage_for_origin(origin:) @devtools.send_cmd('Storage.trackCacheStorageForOrigin', origin: origin) end |
#track_cache_storage_for_storage_key(storage_key:) ⇒ Object
98 99 100 101 |
# File 'lib/selenium/devtools/v129/storage.rb', line 98 def track_cache_storage_for_storage_key(storage_key:) @devtools.send_cmd('Storage.trackCacheStorageForStorageKey', storageKey: storage_key) end |
#track_indexed_db_for_origin(origin:) ⇒ Object
103 104 105 106 |
# File 'lib/selenium/devtools/v129/storage.rb', line 103 def track_indexed_db_for_origin(origin:) @devtools.send_cmd('Storage.trackIndexedDBForOrigin', origin: origin) end |
#track_indexed_db_for_storage_key(storage_key:) ⇒ Object
108 109 110 111 |
# File 'lib/selenium/devtools/v129/storage.rb', line 108 def track_indexed_db_for_storage_key(storage_key:) @devtools.send_cmd('Storage.trackIndexedDBForStorageKey', storageKey: storage_key) end |
#untrack_cache_storage_for_origin(origin:) ⇒ Object
113 114 115 116 |
# File 'lib/selenium/devtools/v129/storage.rb', line 113 def untrack_cache_storage_for_origin(origin:) @devtools.send_cmd('Storage.untrackCacheStorageForOrigin', origin: origin) end |
#untrack_cache_storage_for_storage_key(storage_key:) ⇒ Object
118 119 120 121 |
# File 'lib/selenium/devtools/v129/storage.rb', line 118 def untrack_cache_storage_for_storage_key(storage_key:) @devtools.send_cmd('Storage.untrackCacheStorageForStorageKey', storageKey: storage_key) end |
#untrack_indexed_db_for_origin(origin:) ⇒ Object
123 124 125 126 |
# File 'lib/selenium/devtools/v129/storage.rb', line 123 def untrack_indexed_db_for_origin(origin:) @devtools.send_cmd('Storage.untrackIndexedDBForOrigin', origin: origin) end |
#untrack_indexed_db_for_storage_key(storage_key:) ⇒ Object
128 129 130 131 |
# File 'lib/selenium/devtools/v129/storage.rb', line 128 def untrack_indexed_db_for_storage_key(storage_key:) @devtools.send_cmd('Storage.untrackIndexedDBForStorageKey', storageKey: storage_key) end |