Class: Selenium::DevTools::V85::IndexedDB

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/devtools/v85/indexed_db.rb

Instance Method Summary collapse

Constructor Details

#initialize(devtools) ⇒ IndexedDB

Returns a new instance of IndexedDB.



26
27
28
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 26

def initialize(devtools)
  @devtools = devtools
end

Instance Method Details

#clear_object_store(security_origin:, database_name:, object_store_name:) ⇒ Object



35
36
37
38
39
40
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 35

def clear_object_store(security_origin:, database_name:, object_store_name:)
  @devtools.send_cmd('IndexedDB.clearObjectStore',
                     securityOrigin: security_origin,
                     databaseName: database_name,
                     objectStoreName: object_store_name)
end

#delete_database(security_origin:, database_name:) ⇒ Object



42
43
44
45
46
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 42

def delete_database(security_origin:, database_name:)
  @devtools.send_cmd('IndexedDB.deleteDatabase',
                     securityOrigin: security_origin,
                     databaseName: database_name)
end

#delete_object_store_entries(security_origin:, database_name:, object_store_name:, key_range:) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 48

def delete_object_store_entries(security_origin:, database_name:, object_store_name:, key_range:)
  @devtools.send_cmd('IndexedDB.deleteObjectStoreEntries',
                     securityOrigin: security_origin,
                     databaseName: database_name,
                     objectStoreName: object_store_name,
                     keyRange: key_range)
end

#disableObject



56
57
58
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 56

def disable
  @devtools.send_cmd('IndexedDB.disable')
end

#enableObject



60
61
62
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 60

def enable
  @devtools.send_cmd('IndexedDB.enable')
end

#get_metadata(security_origin:, database_name:, object_store_name:) ⇒ Object



75
76
77
78
79
80
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 75

def (security_origin:, database_name:, object_store_name:)
  @devtools.send_cmd('IndexedDB.getMetadata',
                     securityOrigin: security_origin,
                     databaseName: database_name,
                     objectStoreName: object_store_name)
end

#on(event, &block) ⇒ Object



30
31
32
33
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 30

def on(event, &block)
  event = EVENTS[event] if event.is_a?(Symbol)
  @devtools.callbacks["IndexedDB.#{event}"] << block
end

#request_data(security_origin:, database_name:, object_store_name:, index_name:, skip_count:, page_size:, key_range: nil) ⇒ Object



64
65
66
67
68
69
70
71
72
73
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 64

def request_data(security_origin:, database_name:, object_store_name:, index_name:, skip_count:, page_size:, key_range: nil)
  @devtools.send_cmd('IndexedDB.requestData',
                     securityOrigin: security_origin,
                     databaseName: database_name,
                     objectStoreName: object_store_name,
                     indexName: index_name,
                     skipCount: skip_count,
                     pageSize: page_size,
                     keyRange: key_range)
end

#request_database(security_origin:, database_name:) ⇒ Object



82
83
84
85
86
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 82

def request_database(security_origin:, database_name:)
  @devtools.send_cmd('IndexedDB.requestDatabase',
                     securityOrigin: security_origin,
                     databaseName: database_name)
end

#request_database_names(security_origin:) ⇒ Object



88
89
90
91
# File 'lib/selenium/devtools/v85/indexed_db.rb', line 88

def request_database_names(security_origin:)
  @devtools.send_cmd('IndexedDB.requestDatabaseNames',
                     securityOrigin: security_origin)
end