Question
2
Replies
2800
Views
Posted: March 14, 2018
Last activity: March 19, 2018
Copying ArrayList values to a Value List property in java step.
Hi,
I am having a requirement where i must copy items from an ArrayList into Clipboard property ValueList. This needs to be achieved in a java step.
Kindly, help me with this.
Thanks,
Bhargav
Here is a basic example of iterating through an array and adding the items to a value list property.
ClipboardProperty myProp = myStepPage.getProperty("TestList");
ArrayList<String> myArray = new ArrayList<String>();
myArray.add("North");
myArray.add("South");
myArray.add("East");
myArray.add("West");
for(int i = 0; i < myArray.size(); i++)
{
myProp.add(myArray.get(i));
}