I have started using Page factory, and now i need to provide xpath in @FindBy. It will be great if someone can provide any suggestion or reference on how to pass variable in xpath using @Findby.
Element which i want to replace with @Findby annotation
for(i=1; i <= liElements.size(); i++) {
WebElement linkElement = driver.findElement(By.xpath("//li[" + i + "]/div//a[contains(@class, 'btn-mini')]"));
linkElement.click();
}
Thanks a lot in advance for your help.