Unable to select checkbox within the gridview control in qtp (1212 Views)
Reply
Frequent Advisor
indiranis
Posts: 54
Registered: ‎03-05-2012
Message 1 of 4 (1,212 Views)
Accepted Solution

Unable to select checkbox within the gridview control in qtp

I am currently automating Silverlight application version 4.0 using QTP 11. In a Particular Page, we have a Silverlight Table control inside which we have Silverlight Checkbox control. When we try the object spy, Checkbox is not getting recognized, only Silverlight table object is getting identified.

 

Below is the Code recorded while selecting the Checkbox inside the SilverLight Table,

Browser ().Page ().SlvWindow ("").SlvTable ("gridTree").SelectCell 2,"Caption"

 

When we run the above code, it just highlights particular rather than selecting the checkbox.

 

Set oDesc = Description.Create

Set cCollection = Browser("").Page("").SlvWindow("Shell").SlvTable("grvWOView").ChildObjects(oDesc)
NChecks = cCollection.Count


msgbox NChecks

 

i am using the above code and run, its Identified Hyperlink is the only object within the Gridview. Its not identified Checkbox. Gridview its not showing any child object in qtp. Thanks in advance.

 

Regards,

S. Indra

Frequent Advisor
indiranis
Posts: 54
Registered: ‎03-05-2012
Message 2 of 4 (1,186 Views)

Re: Unable to select checkbox within the gridview control in qtp

Hi,

 

    Checkbox child object is identified qtp i din't do anything. just reviewed our page gridview coding and added one more stackpanel for the checkbox control. now its working.

 

    Please anybody clear my doubts why QTP is not recognized my slvtable child object without stack panel after adding stackpanel in development phase its working.

 

    In other page we din't add any stack panel for the checkbox. its not working also.

 

   Please share your opinion.

 

 

Regards,

S. Indra

Frequent Advisor
indiranis
Posts: 54
Registered: ‎03-05-2012
Message 3 of 4 (1,171 Views)

Re: Unable to select checkbox within the gridview control in qtp

'Browser("SCM - MR Module").Page("SCM - MR Module").SlvWindow("SCMMainPage").SlvTable("dgrdMultiMRDetails").SelectCell 0,2
'Browser("SCM - MR Module").Page("SCM - MR Module").SlvWindow("SCMMainPage").SlvTable("dgrdMultiMRDetails").SetCellData 0,2, 1

 

Problem solved :) Thank you HP support team

Visitor
Pankaj_QTP
Posts: 1
Registered: ‎11-01-2012
Message 4 of 4 (931 Views)

Can anyone help me how to get row count and column count gridview table?

Can anyone help me how to get row count and column count gridview table?

 

 

Currently i am using below code but i am not able to find rowcount and columncount please help me.

 

Thanks In advance.

 

Dim obj1
 

Set obj1 = Browser("title:=.*").Page("title:=.*").WebTable("micclass:=webtable","html id:=ContentPlaceHolder1_rdReport_gvReports", "html tag:=TABLE","index:=145")

 

ColNum = obj1.GetROProperty("Column Count")

RowNum = obj1.GetROProperty("rows")

 

 

Thanks & Regards

Pankaj Gawali

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.