I want to connect to a browser session of this specific anti-detect browser called Incogniton.

It does support Selenium browser automation, but it only supports Python. I don't know anything about Python and I only have knowledge in Java. So I want to manually open the browser session first then connect Selenium to control the driver.

I have tried to follow this tutorial: https://learn-automation.com/how-to-execute-selenium-scripts-on-already-opened-browser/ with this code but no luck:

import org.openqa.selenium.chrome.ChromeOptions;
import java.io.IOException;

public class selenium {
    public static void main(String[] args) throws InterruptedException, IOException {
        System.setProperty("webdriver.chrome.driver", "C:\\Users\\test\\browser\\117\\win\\chrome.exe"); //this is the dir of the Incogniton's chrome driver

        ChromeOptions options = new ChromeOptions();
        options.setExperimentalOption("debuggerAddress", "");
        WebDriver driver = new ChromeDriver(options);


And it's giving me this error:

[4540:3448:0927/210547.993:ERROR:policy_logger.cc(154)] :components\enterprise\browser\controller\chrome_browser_cloud_management_controller.cc(163) Cloud management controller initialization aborted as CBCM is not enabled.

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

So how can I fix this problem? How can I use Java with Selenium to control the driver if it only supports Python?

Here's the Incogniton docs about Selenium automation: https://incogniton.com/knowledge%20center/selenium-browser-automation/

  • 1
    Those docs make it very clear that Python is the only language that can work with the browser. It looks like your only options are to wait until they enable java automation, or to learn python. You could try to hack in the ports that the automation requires, but there's no guarantee and it's likely to be very frustrating.
    – Kate Paulk
    Commented Sep 27, 2023 at 20:39
  • @KatePaulk Can you give me a hint on how to hack the port as you said ?
    – likenzy
    Commented Sep 28, 2023 at 3:05
  • You would have to use driver options to set the ports, similar to the code you've shown in the question.
    – Kate Paulk
    Commented Sep 28, 2023 at 11:10
  • I saw your post on many forums and you didn't find an answer anywhere :( This topic is also very important to me, and just like you, I don’t know Python. Please write whether you have made any progress in solving this problem, and whether there is any progress at all. Thanks a lot Commented Mar 16 at 23:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.