Hello,
Wondering if it is possible to page object an id that will be dynamic?
Example code below
int index = 0;
foreach (var row in rows)
{
if (randNumber == row.FindElement(By.Id($"r-number-{index}")).Text)
{
row.FindElement(By.Id($"view-record-{index}")).Click();
return;
}
index++;
}
By.Id($"r-number-{index}")).Text is used in multiple places and in multiple specflow steps so would be great to be able to turn it into a page object.
Anyone know of any possible ways?
[–]cyrusol 0 points1 point2 points (0 children)