Rayrun
← Back to Discord Forum

How click iframe or verify are human cloudflare (firefox)?

Saito Harugaposted in #help-playwright
Open in Discord
Saito Haruga
Saito Haruga

My code:

(async () => {
  const browser = await firefox.launch({
    headless: false
  });
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.goto('about:blank');
  await page.waitForTimeout(1000);
  await page.goto('https://shitflare.asia/');
  await page.waitForTimeout(6000);
  await page.locator('iframe[title="Widget containing a Cloudflare security challenge"]').click(); 
  console.log("nexuy idi");

  // ---------------------
  await context.close();
  await browser.close();
})();```

Does not click on iframe through firefox, how can I click on this checkbox?

This thread is trying to answer question "How can I click on a checkbox within an iframe using Firefox in Playwright?"

1 reply

you're not invoking the iframe. await page.locator('iframe[title="Widget containing a Cloudflare security challenge"]') should be await page.frameLocator(......

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.