We are using TestMu AI cloud for web automation with the Selenium framework on our live website. We see that random failures in certain tests, what could go wrong?
Hey @akriti_sinha
Since there are intermittent failures, we recommend reviewing the test script and implementing proper wait mechanisms to ensure that elements are available before performing actions.
As you are testing a live website, we suggest checking the Cloudflare settings to ensure that automated traffic from the testing environment is not being blocked or challenged.
In the past, we have come across such failures and the failure was attributed to requests being blocked by the server (likely by Cloudflare security rules). The successful test returned HTTP 200 (OK) whereas the failed one returned HTTP 403 (Forbidden).
Response Header (CF - Pass)
Accept-Ranges:bytes
Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Origin:*
Age:455914
Cache-Control:public, max-age=1209600, immutable
Cf-Cache-Status:HIT
Cf-Ray:9e0f8a438ff53c66-DUB
Response Header (CF - Failed)
Cf-Mitigated:challenge
Cf-Ray:9e0ff921a8701b9d-DUB
Content-Encoding:br
In such cases, our suggestion is to check with your network team to configure the bypass at the Cloudflare configuration level.
Do share more details about the execution so that we can help you out.