Please, could someone help me with a simple issue of implementing Selenium with IndexedDB? I already consulted
, but it wasn't enough (including "logging" by "desired_capabilities" is deprecated).
Basically the code I wrote is:
import time
from selenium.webdriver.common.by import By
from selenium
import webdriver
from webdriver_manager.chrome
import ChromeDriverManager
from selenium.webdriver.chrome.service
import Service
from seletools.indexeddb import IndexedDB
# # Configurações do Driver Options
ops = webdriver.ChromeOptions()
prefs = {"browser": "ALL",
'performance' : 'ALL',
'enableNetwork' : True,
'enablePage' : True,
}
ops.add_experimental_option('prefs', prefs)
servico = Service(ChromeDriverManager().install())
browser = webdriver.Chrome(service=servico, options=ops)
idb = IndexedDB(browser, "dbname", 1) # webdriver instance, db name, db version
value = idb.get_value("[thekey", "tablename") # table name, key in table
it happens that Selenium does not find the IndexedDB database (even when I manually access it via F12 in the window opened by Selenium, it is not present).
Any suggestions where I might be wrong? Any help is welcome (I'm still taking my first steps in programming).
Thanks,
Bruno W.