The web page has a table in which there are names and quite many checkboxes associated with them. In my script I need to first find out a name(text), say 'DHINGRA' from the heading 'Payee Short Name' and then I need to check the checkbox associated with the text 'DHINGRA'. I need to do that at Runtime.
Can anyone please tell me how do I do it?
If it's a table like you said, you can use somet table function for search the name row by row in the Short name colume and move to left column when the name found. Check TLS online reference about tabel (tbl) releated functions. (WR doesn't recognize your table in the link you provided here, check you only application). Good Luck to you.
The logic that U suggested me is what I had in my mind, but how to implement it is what I am unable to do.
The table functions would only be implemented once the object is in the GUI Map.
I want the object to be entered into the GUI Map at Runtime and the script to check it once it is added and recognized.
Can anyone help me in that.
I guess it is a slightly advanced concept.
No its not advanced, i leave it up to you as a learner how to read the data from the table, and get the row number you are on.
But let me explain how your problem will get solved.
As you have stated that you get check boxes in a table i presume that they are related to records displayed(i.e. for every record there is a check box) now by using tbl functions you will be able to find the row where check box exists. Now apply this logic in code
(Note: Before doing so please check "location" property of first check box it should be 0 or 1)
1. Get the row number where check box is
2. use function to add obj
GUI_add(class: object,MSW_class: html_rect,html_name: "minus.gif",location: " & i &"})".
Please note that variable "i" should be the row number (adjust it according to first check box)
3. you are all set now you can use this newly object for check uncheck.
Main thing is to learn how to use GUI_ADD function, so look WinRunners help for more details.
There's a solution for every problem, it depends how quick you want it
Learn 3-4 check boxes. There should be a property of the check box which will Uniquely identify each check box on the HTML page. Now what you have to do is just set that property at the run time. There are some functions starting with GUI_ which can set the property of GUI objects at run time.you can look up the function from the help.
my case is somewhat matching with that of anuj but with a difference.
in my case, each checkbox is located in different table (if 10 checkboxes on an page,then it has 10 tables for it. this is apart from other tables defined on same page) how should i go for recognizing a particular checkbox and then clicking it.