TestProject Forum

How to bypass CloudFlare bot protection on TestProject web tests

I want to automate a few web tests on the Hubspot CRM platform, But Hubspot has Cloudflare bot protection enabled on their Login Flow. So every time I create a test on TestProject to visit the Hubspot page, The page shows a “Checking your browser before accessing” message and it will not go any further.

So Is there any way to prevent this Bot check?

While searching for answers, I found this java - Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection - Stack Overflow

But, this is a Python version, How can configure equivalent version of these settings on TestProject? For ex: How can we execute a driver script * ```
driver.execute_script(“Object.defineProperty(navigator, ‘webdriver’, {get: () => undefined})”)

Hi @pavangowda,
Currently TestProject agent uses selenium 3.14, and thus the method execute_cdp_cmd script is not available.
In the upcoming version the agent should support selenium 4.0 and you will be able to execute cdp script using an addon.
I have opened a request number TP-16979 to create such addon, and I will notify you once it’s resolved.

Note that you will need to wait for the agent to support selenium 4.0.

In the meantime, I suggest asking your developers to disable this feature for testing purposes in the dev/stg environments as generally you are not trying to automate bot detection mechanisms or test Cloudflare’s services.