Unable to retrieve values which are in XML data bank in extension tool
I am storing the DB tool output to the XML data bank.
In other test (where i am using Extension tool) i am trying to retrieve the value using the below code. but it's returning NULL.
import com.parasost.api;
public void getData(input,sc){
String value =sc.getValue("Custom column name");
Application.showMessage("The value is: "+value);
}
Comments
-
String value =sc.getValue("Custom column name");
This is how you access a test variable, not a data source or data bank column. Data Banks belong to a data source named "Generated Data Source." Do this instead:
String value = sc.getValue("Generated Data Source", "Custom column name")
0 -
Hi Benken,
I have tried this but still getting Null.
String value = sc.getValue("Generated Data Source","Custom column nmae");
0 -
I have tried this but still getting Null.
This will work if the Data Bank column was written to. If the XPath in your Data Bank did not match anything then nothing will be written to the column. Also make sure that for "Custom column name" you are actually using the real name of the custom column that was configured in the extraction in your Data Bank.
0