I'm using regular expression in watin.
I have something like: ie.Button(Find.ByName(new Regex(input))).Click();
but I wan't to click on the second or third button that match and not the first one.
How can I do this?
I'm using regular expression in watin.
I have something like: ie.Button(Find.ByName(new Regex(input))).Click();
but I wan't to click on the second or third button that match and not the first one.
How can I do this?
Try this:
ie.Button(Find.ByName(new Regex(input)) && Find.ByIndex(1 /* or 2 */)).Click();
Try this:
ButtonCollection buttonCol = ie.Buttons;
buttonCol = buttonCol.Filter(Find.ByName(new Regex(input)));
buttonCol[1].Click();
buttonCol[2].Click();