So I have a script where after submission of application I need to open the chrome console tab and then write this command page_data.application_id to fetch the application id. So I need tos store that in a variable to use it later on.
Can someone tell me the code for that?
I tried this code in my step-definition file
JavaScriptExecutor executor=(Javascript Executor)driver; String appId= (String)executor.executeScript("page_data.application_id"); System.out.println(appId);
But this code is returning null.