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");
the dir of the Incogniton's chrome driver
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("debuggerAddress", "127.0.0.1:9222");
WebDriver driver = new ChromeDriver(options);
driver.get("https://google.com");
System.out.println(driver.getTitle());
}}
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. <pre>
So how can I fix this problem and how can I use Java with Selenium to control the driver even though it only supports Python?
Here are Incogniton docs about Selenium automation: https://incogniton.com/knowledge%20center/selenium-browser-automation/
What I have tried:
I tried to follow this tutorial:
https://learn-automation.com/how-to-execute-selenium-scripts-on-already-opened-browser/ with this code, but no luck.