Automated app test with selenium triggering Cloudflare

I’m in the process of launching an app and currently trying to add some automated tests
I’ve set a development store that is gonna have my app pre-installed
When trying to access my admin store using Selenium web driver I receive a Captcha by cloudflare - any way I can disabled this for a specific store?

1 Like

Unfortunately I don’t believe it’s possible. Cloudflare is Shopify’s WAF and it applies to all pages and stores.

You could try using a service like Browserless which has a bot bypass feature, but it’s just a cat and mouse game between browser emulation and bot protection.

But would love to be wrong, I would also love to automate our E2E testing. The closest I’ve gotten is downloading the raw HTML/JS/CSS of a specific page, then using an Express server to make a mock page to test functionality on a single page.

Hello,

I know this is old, but it’s the first result I came accross on Google. so it may help someone else, Shopify seems to now support Crawler Access in Online Store preference and that seems to fix the 429 and Cloudflare blocking https://help.shopify.com/en/manual/promoting-marketing/seo/crawling-your-store

It can be setup in selenium for chrome by setting this up on the devtools with Chrome DevTools Protocol - Fetch domain Chrome DevTools Protocol - Fetch domain

And see selenium config:

Would @Dylan s mock bridge help here?

Thanks for the mention @Liam-Shopify

It depends on what they are trying to test.

  • Online store (customer facing) - meaning specifically the online storefront, the end customer experience on Shopify. You’ll need to allow Crawler Access as @Bertrand_Provost mentioned
  • Shopify Admin (merchant facing) - meaning the admin dashboard for merchants where they interact with your embedded app. Then you can use the MockBridge for testing your apps functionality, etc.

So basically, if you need to test as a customer then enabling page crawling is the solution for automation testing.

If you’re testing as a merchant then reach for the MockBridge for automated testing.