Storage

Get Storage

Fetches stored data from multiple browser storage systems based on the requested storage type. Supports filtered or full retrieval of cookies, key-based or full dumps of localStorage and sessionStorage, cache inspection, and structured IndexedDB queries for databases, object stores, or individual records. Returns the requested data as JSON to the native application.

NOTE

Parameter Cookies LocalStorage SessionStorage Cache Storage IndexedDB
Domain action.Domain (implicit current origin) (implicit current origin) (implicit current origin) (unused, origin-scoped)
Path action.Path (cookie path) (unused) (unused) (unused) action.Path (database name)
StoreName (unused) (unused) (unused) action.StoreName (cache name) action.StoreName (object store)
Key action.Key (cookie name) action.Key action.Key action.Key (cache name / request) action.Key (record key)
Wildcard allowed? Domain, Path, Key Key only Key only StoreName, Key Path, StoreName, Key

Examples

GPAL Fluent: High-level fluent C# API

//GetStorageData is how the answer comes back, and it is the only storage call that hands anything out. Naming no filter runs every action of that type the url declared, which is how you read a whole set in one call; naming a key or a domain narrows it to the declared actions that match. What comes back is JSON, and how far it reaches is however far the declared action reaches: a cookie action declared only as far as path / answers with the names it found there.

GPALUrl youtube = "www.youtube.com";


youtube.WithStorageType(WebsiteStorageType.localStorage)

.WithStorageKey("ytidb::LAST_RESULT_ENTRY_KEY");


youtube.WithStorageType(WebsiteStorageType.cookie)

.WithStorageDomain("youtube.com")

.WithStoragePath("/");


browser.GoTo(youtube);


// one named record

browser.WithStorageKey("ytidb::LAST_RESULT_ENTRY_KEY")

.RunGet(WebsiteStorageType.localStorage)

.GetStorageData(out string record);


// no filter, so every cookie action declared on the url runs

browser.RunGet(WebsiteStorageType.cookie)

.GetStorageData(out string cookies);

MagicHelper: MagicHelper utility library

browser.MagicHelper.GetStorage(WebsiteStorageType storage type, string domain, string path, string key, string storeName);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.GetStorage(WebsiteStorageType.localStorage).WithStorageDomain("ebay.com").WithStorageKey("u_sclid").Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.GetStorage(string storageType, string sessionId, string domain, string storeName, string path, string key);

REST Client: Direct REST/HTTP client

browser.OttoMagicClient.WithEndpoint(ApiEndpoint.GetStorage).WithStorageType(WebsiteStorageType.localStorage).WithStorageDomain("ebay.com").WithStorageKey("u_sclid").Execute();

💬 Ask GPAL