Innovative way to select a radio button in a table w/o location or part value
The problem: How does one select a radio button in a table without knowing the part value or the location?
In my application I am designing functions for a yet to be delivered application. I know for a fact the part values will change with each release, and the locations are unstable... argh...
The radio button has text in the same row that is consistent. Find this text and search the row for the first radio button. If found toggle it. No use of location or part value.
Sample script is attached:
This could be easily modified to look account for table cells that have more than one radio button...
Hope this helps...
Re: Innovative way to select a radio button in a table w/o location or part value
If the table is the only thing that has radio buttons, once you find the row, you can use the row number to calculate the ordinal location of the radio button you want.
For example, if you find the text on the 17th row (adjusting for header rows, of course), then web_obj_get_child_item(MainFrame, 0, 0, "html_radio_button", 16, ThisRadio) will get the radio button on the same row.