I want to create a WebElement list from a String List by using Findby.
My String array has this value:
String [] s1 = {"Sale Condo", "Rent Condo"};
And I am looping this String array to create a list of WebElement by doing this:
List<WebElement> allElem=new ArrayList<WebElement>();
for (String s: s1){
@FindBy(linkText=s)
allElem.add();
}
I am not able to do it. Please help on how can I accomplish this.
