Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
josegarridodigio opened this issue Jan 10, 2025 · 0 comments

Comments

@josegarridodigio
Copy link

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

@josegarridodigio josegarridodigio changed the title Cache not working outside test environments - Feature Request or Clarification [Feature Request or Clarification] - Cache not working outside test environments Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant