This project is read-only.

Two buttons with same name (text) but no automation ID

Jan 21, 2009 at 6:08 AM
Hi there,

I have couple of buttons (in different panels) with same Textand no automation ID. I am not able to figure out how to distinguish them and use as per my needs.

Jan 21, 2009 at 8:55 PM
Do the panels have automation ids? If so, then you might be able to create a CustomUIItem for each panel and then access the buttons from there.

Or you could try using something like this:

List<Button> SaveButtons = myWindowOrContainer.GetMultiple(SearchCriteria.ByControlType(ControlType.Button).AndByText("Save")).Cast<Button>().ToList();


Jan 26, 2009 at 2:59 PM
use search by index criteria. there is a little about it here