async function action(page) {
  const elements = await page.$x(
    "//button[contains(., 'Create detached DOMs')]",
  );
  const [button] = elements;
  if (button) {
    await button.click();
  }
  // clean up external references from memlab
  await Promise.all(elements.map(e => e.dispose()));
}
Specify how memlab should perform action that you want
to test whether the action is causing memory leak.

@param page - Puppeteer's page object:
https://pptr.dev/api/puppeteer.page/