Skip to content

[Feature Request or Clarification] - Cache not working outside test environments #263

Open
@josegarridodigio

Description

Context:

I am currently using the midscene.js library, specifically the cache functionality as described in the documentation.

Problem:

I noticed that the cache is not working when the environment is not set to test. This behavior limits the ability to take advantage of the cache outside testing scenarios.

Question:

Is it possible to enable or apply the cache functionality outside of test environments? If not, could this feature be implemented in future versions?

Example:

Below is an example script where I would like to leverage the cache functionality:

export const scrapeWeb = async () => {
    const browser = await chromium.launch();
    const context = await browser.newContext();
    const page = await context.newPage();
    const webPage = new PlaywrightWebPage(page);
    const agent = new PlaywrightAgent(webPage);

    // Rest of the scraping logic...
};

Any guidance or clarification would be highly appreciated. Thank you for your support

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions