Hi Pavan,
the code u r using is
'Check the checkbox
cInt(Browser("").Page("").Frame("").WebTable("").childitem(rNum,1,"WebCheckBox",0).set
"ON"
which is wrong, child item returns collection. u need to capture that
collection object in a variable and access it.
try the code
set chd=Browser("").Page("").Frame("").WebTable("").childitem(rNum,
1,"WebCheckBox",0)
chd.count()'gives no of WebCheckBoxes in that cell
chd.set "ON"
try this code this will work
Browser("").Page("").Frame("").WebTable("").childitemcount(rNum,
1,"WebCheckBox",0)
' this gives no of items in that cell with the class "WEBCHECKBOX"
On Fri, Aug 21, 2009 at 9:56 PM, 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
-~----------~----~----~----~------~----~------~--~---