c# - CodedUI: Find WinTable specific column index -
how column index specifying column name?
code:
wintable uicusttable = new wintable(uicustgrid); int columnindex=uicusttable.getcolumnnames("column1");
can somethig this? wont work actually. column placement changes on different windows.
help
try this:
wintable = new wintable(); var desiredcolumn = a.columnheaders.firstordefault(columnheader => columnheader.name == "column1"); int indexofcolumn; if (desiredcolumn!=null) { indexofcolumn = a.columnheaders.indexof(desiredcolumn); }
Comments
Post a Comment