Hi, I’m curious about this, is there any way to bypass the Cloudflare Anti Bot System? We can achieve this goal if develop on python, by using some library such as selenium-stealth
, selenium-wire
, or undetected-chrome
, I’ve tried by initiate my own driver and also adding some experimental option and preference, but seems it doesn’t work, here’s my code :
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.chrome.ChromeDriver as ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions as ChromeOptions
import org.openqa.selenium.remote.DesiredCapabilities as DesiredCapabilities
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
// Chrome Options
ChromeOptions options = new ChromeOptions()
//Set Experimental option
options.setExperimentalOption('excludeSwitches', ['enable-automation'])
options.setExperimentalOption('useAutomationExtension', false)
// Set the user agent string & disable automation
options.addArguments('–disable-blink-features=AutomationControlled')
options.addArguments('user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36')
// Webdriver
WebDriver driver = new ChromeDriver(options)
// Change Webdriver
DriverFactory.changeWebDriver(driver)
// Use the WebDriver to navigate to the URL
DriverFactory.getWebDriver().get('https://example.com')
Highly appreciated if someone can help me to achieve this, thanks a lot