Hi Pavan,

As far from ur explanation in what i understood is that u WebTable in which
there is checkbox which you need to set "ON".If i am right just some
questons.

1. Why you are associating WebTable since it will change after every entry?
2.Why you are coding for such a lengthy hierarchy?
3.Your main objective is to check the checkbox Ok?

if this is the scenerio then follow this:-
1. First check the column where this checkbox is placed.
  * Browser(".*").Page(.*).WebTable("Property:=value").getcelldata(r,c)*
2. Find the rowcount using webtable
*Browser(".*").Page(.*).WebTable("property:=value").rowcount*
This will give rowcount for present table there might be next Table also.
3.Now you got the rowcount,and the column no. of checkbox
4.Since child object is checkbox so use descriptive programming

Set chk_bx = Description.Create()
chk_bx("micclass") = "CheckBox"

Set chk_cnt =
Browser(.*).Page(.*).WebTable(property:=value").childobjects(chk_bx)
this will return the no of checkbox in that table.

5. for i=0 to chk_cnt.Count -1
   chk_cnt(i).Set "ON"
Next

Just try this and let me know if this works try avoiding repository as much
as possible.
If i am wrong let me know,i have one more solution.Other wise send me your
detail scenerio.

Regards
Naveen Shrivastava

=============================================================





On 8/22/09, Pavan Turlapati <[email protected]> wrote:
>
>
> I know it would have been very nice if I could have provided you some
> snapshots to analyze the problem in a better way, but with the limited
> permission I have, I will try to describe my problem here. Please help
> if you have a solution for the issue.
>
>
> I have a simple web table. This object when added into our shared
> object repository is having 40 rows. The webtable has a check box in
> its first column. My target was to check the checkbox.
>
>
> How I coded:
> 'Find the desired row in the webtable
> rNum=cInt(Browser("").Page("").Frame("").WebTable
> ("").getRowWithCellText(Parameter("CheckValue"))
>
> 'Check the checkbox
> cInt(Browser("").Page("").Frame("").WebTable("").childitem(rNum,
> 1,"WebCheckBox",0).set "ON"
>
> It worked intially. Now the above statement is not working.  Though
> the object spy of the web table shows the row count as 40, but
>
>
> cInt(Browser("").Page("").Frame("").WebTable("").getCelllData(1,1): is
> giving me the content of the whole table. Yes of all the 40 rows in a
> single column.
>
>
> Problem as per me: The webtable which I intended is not taken by QTP.
> When it had to show me 40 rows data.All data is coming in the first
> row/column itself.
>
> So, I now wanted to check with you is: How can I update that table
> properties, since the update from application option I used is
> updating the rowcount correctly to 40.But while running the script,
> table is coming as a single row.
>
>
> Please, revert back if you need any other information.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to