How to use the returned value from java function (step) defined in step-definition file in feature file
So I have a selenium code and I defined the step in step-definition file as, in here I am returning the value of appId which we are fetching from chrome console and then we need to use it in our feature file:
How to use the returned value from java function (step) defined in step-definition file in feature file in selenium
So I have a selenium code and I defined the step in step-definition file as:
@And("we get appId from console") public String weGetAppIdfromConsole(){ JavaScriptExecutor executor=(Javascript Executor)driver; String appId= (String)executor.executeScript("return page_data.application_id"); System.out.println(appId); return appId;}