The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1
aks1
Junior Member


Reged: 11/11/04
Posts: 9
Read header text for data grid in Flex using QTP
      #549527 - 02/10/09 07:11 PM

Can someone please suggest a way to read column names in advanced data grid in Flex using QTP??

Post Extras: Print Post   Remind Me!   Notify Moderator  
aks1
Junior Member


Reged: 11/11/04
Posts: 9
Re: Read header text for data grid in Flex using QTP [Re: aks1]
      #549870 - 02/11/09 06:01 PM

Please suggest if not for flex but in general how to read column names for a datagrid...

Post Extras: Print Post   Remind Me!   Notify Moderator  
IanFraserModerator
Super Member


Reged: 07/11/04
Posts: 2112
Loc: Brisbane
Re: Read header text for data grid in Flex using Q [Re: aks1]
      #549871 - 02/11/09 06:06 PM

You most likely haven't had an answer because your question lacks detail.

QTP Version? Addins in use? etc....

What have you tried that isn't working? (Post Code)

A little effort and a demonstration of some degree of self help goes a long way.

--------------------
You can buy my Art from: "Post Cards now available"
Ian Fraser Landscape Photography
World Wide Shipping.

http://mowogman.wordpress.com/


Post Extras: Print Post   Remind Me!   Notify Moderator  
aks1
Junior Member


Reged: 11/11/04
Posts: 9
Read header text for data grid in Flex using QTP [Re: IanFraser]
      #550174 - 02/12/09 03:55 PM

Thanks for your response Fords_rock

I am using QTP 9.2 and Flex 3 add-in available from Adobe.

My application has flex Advanced datagrid object and I am trying to read column names for the datagrid.

I have contacted developers and they told me that column names for flex advanced datagrid are stored in "Header Text"

I have tried reading "Header Text" using GetROProperty("HeaderText") but it doesn't return anything.

I have tried the following code:
----------------------------------------------------
x = Browser("app").FlexApplication("flexapp").FlexCanvas("Canvas").FlexAdvancedDatagrid("estimategridid").GetROProperty("Header Text")
msgbox x

----------------------------------------------------
I have also tried getting value for column names using other available properties for webtables like outerhtml, outertext, alt etc. but I don't get any data.

Part of the problem may be because none of the above mentioned properties are supported by Flex Advanced datagrid.

I have also tried getting child objects but I always get the data in datagrid as values but not the column names.


My primary reason for getting column names is to write a function to update cell in datagrid independent of application. So, I want to pass column name as a parameter to the function and get the corresponding columnIndex in the function by comparing the parameter value against column names.

Thanks to all for you help...


Post Extras: Print Post   Remind Me!   Notify Moderator  
IanFraserModerator
Super Member


Reged: 07/11/04
Posts: 2112
Loc: Brisbane
Re: Read header text for data grid in Flex using [Re: aks1]
      #550176 - 02/12/09 04:22 PM

Now thats a far better question.

When you do a spy on the objects do you get any values?

--------------------
You can buy my Art from: "Post Cards now available"
Ian Fraser Landscape Photography
World Wide Shipping.

http://mowogman.wordpress.com/


Post Extras: Print Post   Remind Me!   Notify Moderator  
aks1
Junior Member


Reged: 11/11/04
Posts: 9
Re: Read header text for data grid in Flex using [Re: IanFraser]
      #550193 - 02/12/09 06:58 PM Attachment (140 downloads)

Hi Fords_Rock

Thanks for your reply..I am really thankful to you for pointers you are providing and your help.

I am attaching the advanced datagrid's properties and their values as captured.

I don't know any property which I can use to get the values for column names

I apologize for work file and snapshots as means to convey properties but I tried exporting in XML format and that froze my OR.

Please have a look.

Thanks


Post Extras: Print Post   Remind Me!   Notify Moderator  
tamja
Junior Member


Reged: 09/22/01
Posts: 13
Re: Read header text for data grid in Flex using [Re: aks1]
      #571413 - 05/27/09 10:57 AM


Set myGrid = Browser("app").FlexApplication("flexapp").FlexCanvas("Canvas").FlexAdvancedDatagrid("estimategridid")
arrayColNames = GetHeaderColNames ( myGrid )
For ItemIndex = 0 To UBound(arrayColNames)
Print "[" & ItemIndex & "] " & arrayColNames(ItemIndex)
Next


Function GetHeaderColNames ( objFlexDataGrid )
Dim arrColNames()
Dim Columns

Columns = objFlexDataGrid.GetROProperty("ColumnCount")
ReDim arrColNames(Columns-1)

For i = 0 to Columns - 1
arrColNames(i) = objFlexDataGrid.GetAutomationChildAt(i).GetROProperty("automationvalue")
Next

GetHeaderColNames = arrColNames
End Function


Post Extras: Print Post   Remind Me!   Notify Moderator  
Franklyn
Member


Reged: 03/15/08
Posts: 131
Re: Read header text for data grid in Flex using [Re: tamja]
      #639461 - 08/20/10 03:10 AM

Hi tamja,

have you tried the above script to get the column name of AdvancedDataGrid.. Because the above code just retreives the automationname of FlexListLabel/FlexLabel present in a ADG.. So can you please help us to retreive the column name from flexadvanceddataGrid..


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 79 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5612

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5