async function checkClassWithTimeout (page, element, className, maxWaitTime = 16000, pollInterval = 500) {
  const startTime = Date.now()
  while ((Date.now() - startTime) < maxWaitTime) {
    const hasClass = await element.evaluate((el, className) => el.classList.contains(className), className)
    if (hasClass) return true
    await page.waitForTimeout(pollInterval)
  }
  return false
}
Function to check if an element contains a specific class within a maximum wait time.
@param {Page} page - The page object.
@param {ElementHandle} element - The element to check.
@param {string} className - The class name to check for.
@param {number} maxWaitTime - Maximum wait time in milliseconds.
@param {number} pollInterval - Interval between polls in milliseconds.
@returns {Promise<boolean>} - A promise that resolves to a boolean indicating if the class was found.