My code is :
for (int z = 0; z < rows.size(); z++) {
rows.get(z).findElement(By.xpath("//*[@class='ng-scope'][" + (z + 1) + "]//*[@placeholder='Stop Name']")).sendKeys(shuttleObj.getStopArea());
}
And I want to use repository to pass xpath. I want this value multiple times for every rows in a table but if I am taking properties like
for (int z = 0; z < rows.size(); z++) {
rows.get(z).findElement(By.xpath(props.getProperty("path[" + (z + 1) + "]area")).sendKeys(shuttleObj.getStopArea()));
}
path=//*[@class='ng-scope']
area=//*[@placeholder='Stop Name']
This code is not working. If I am taking total elements like
path=//*[@class='ng-scope'][" + (z + 1) + "]//*[@placeholder='Stop Name']
It can be able to run but in same row. But I want this value in every rows in a table.
props.getProperty(path+ "[" +(Z+1)+ "]" + value)
value
by yourarea
variable name."
stiil beforepath
variable and afterarea
variable these are your simple variable with string values which you want to use.props.getProperty(path+ "[" +(Z+1)+ "]" + area)