I am running a UI test in karate where I need to fetch the details of local host where test are running in karate, earlier I was using selenium to the same task with the following code
ChromeOptions chromeOptions = new ChromeOptions();
WebDriverManager.chromedriver().setup();
ChromeDriver driver = new ChromeDriver(chromeOptions);
HttpCommandExecutor executor = (HttpCommandExecutor) driver.getCommandExecutor();
URL url = executor.getAddressOfRemoteServer();
And this url was returning
http://localhost:7150
Is there way to get these details in karate framework for UI tests.