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
sameep
Member


Reged: 12/05/06
Posts: 32
QTP Flex Datagrid Problem
      #605987 - 12/14/09 08:16 PM

Hi All,

We are automating a Flex Application using Flex plugin provided by Adobe.

Here are the Environment Details:
QTP - v 9.5
Flex Plugin - v 3.0
Application is compiled using Flex SDK 3.0

Problem Description:

We have a Flex Data Grid which has 28 Columns. Full Grid is not visisble on one screen and to see the complete Grid you have to Scroll Right 2-3 times.

We want to Read Data from Xth Row and Yth Column of the Grid. With the help of GetROProperty("rowcount") and GetROProperty("columncount") - We know the total no of rows and columns in the Grid.
We tried descriptive programming as well to find all the Child Objects (FlexDataLabel) in Data Grid and than read 'automationvalue' from them - but it was only partially successful as QTP only gives Child Objects which are visible on Screen at that time. In our cases as the Full Data Grid is not visible at one time because it has 28 columns - We dont get all the Child Objects.

It will be of great help if somebody can help us know the 'GetCellData' equivalent function for FlexDataGrid.

Thanks!!


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


Reged: 06/07/07
Posts: 353
Loc: India
Re: QTP Flex Datagrid Problem [Re: sameep]
      #606051 - 12/15/09 03:26 AM

I am not sure, but this link may help you:

http://myqatools.blogspot.com/2009/03/callin-xml-file-dim-oxml-set-oxml.html

--------------------
- Manish


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


Reged: 06/27/07
Posts: 144
Re: QTP Flex Datagrid Problem [Re: Mann_India]
      #606091 - 12/15/09 06:37 AM

Don't you see GetCellData, GetItemsCount, GetRowData built-in methods?
Try the combination of these three methods and see if you can get what you want.

--------------------
"God doesn't play dice" - Einstein


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


Reged: 09/22/01
Posts: 13
Re: QTP Flex Datagrid Problem [Re: tjgomes]
      #606282 - 12/16/09 08:39 AM Attachment (814 downloads)

try something like this with the attached vbs class code:

'// Instantiate a clsCustomFlexDataGrid object
set myGrid =Browser("MyBrowser").FlexApplication("MyFlexApp").FlexDataGrid("MyGrid")
set myCustomGrid = New_clsCustomFlexDataGrid( myGrid )

'// Get the text value of cell in row index 0, column index 3. Zero based so its really row 1, col 4.
cellValue = myCustomGrid .GetCellData ( 0, 3 )
msgbox cellValue


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


Reged: 12/05/06
Posts: 32
Re: QTP Flex Datagrid Problem [Re: tjgomes]
      #606383 - 12/16/09 09:53 PM

Quote:

Don't you see GetCellData, GetItemsCount, GetRowData built-in methods?
Try the combination of these three methods and see if you can get what you want.




tjgomes,

I can see there is a method GetItemsCount - However, there is no inbuilt method named GetCellData or GetRowData in Flex QTP Addin..


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


Reged: 12/05/06
Posts: 32
Re: QTP Flex Datagrid Problem [Re: tamja]
      #606390 - 12/16/09 10:21 PM

Quote:

try something like this with the attached vbs class code:

'// Instantiate a clsCustomFlexDataGrid object
set myGrid =Browser("MyBrowser").FlexApplication("MyFlexApp").FlexDataGrid("MyGrid")
set myCustomGrid = New_clsCustomFlexDataGrid( myGrid )

'// Get the text value of cell in row index 0, column index 3. Zero based so its really row 1, col 4.
cellValue = myCustomGrid .GetCellData ( 0, 3 )
msgbox cellValue




Hi Tamja,

Thanks, it really helped, but seems its very slow.


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


Reged: 06/07/07
Posts: 353
Loc: India
Re: QTP Flex Datagrid Problem [Re: sameep]
      #606391 - 12/16/09 11:03 PM

Sameep,

This link is all about FlexGrid coding, you may find something from this:

http://www.bigresource.com/VB-Retrieve-V...html#1HnwzxNkyo

--------------------
- Manish


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


Reged: 02/13/08
Posts: 37
Re: QTP Flex Datagrid Problem [Re: Mann_India]
      #606412 - 12/17/09 03:06 AM

Hi Tamja
Your code is working fine for Flex advaced data grid but it is throwing general run error when th object is Flex data grid.Using your functions I am unable to click a row in Flex data grid and also not able to know the row value.


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


Reged: 09/22/01
Posts: 13
Re: QTP Flex Datagrid Problem [Re: sameep]
      #606476 - 12/17/09 07:29 AM

Yes, it can be quite slow because it has to iterate through every child object in the FlexDataGrid object so that the more columns and rows, the slower it runs. You can limit the number of rows to look at by setting myCustomGrid.AllRows = False so it only does the visible rows or myCustomGrid.MaxRows = 10 to limit to first 10 rows. You could probably modify the code to do the same for the number columns to consider.

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


Reged: 09/22/01
Posts: 13
Re: QTP Flex Datagrid Problem [Re: goodboy2008]
      #606479 - 12/17/09 07:38 AM

goodboy2008,
This was designed for a FlexDataGrid not Advanced Data Grid so not sure about how it works for that.

Have you tried:
'// Click on a row based on value in a column. You can change the column using the ColName property
retValue = myCustomGrid.ClickFlexGridRow( "My Value" )

'// Another way to click on a row is to get the row index and then do a SelectIndex on the grid
idx = myCustomGrid.GetRowIndex ( "My Value" )
retVal = myCustomGrid.SelectIndex( idx )


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


Reged: 03/15/08
Posts: 131
Re: QTP Flex Datagrid Problem [Re: tamja]
      #616887 - 03/08/10 10:11 PM

Tam .. 1000's of thanks to you... ! You are great!

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


Reged: 03/15/08
Posts: 131
Re: QTP Flex Datagrid Problem [Re: Franklyn]
      #619067 - 03/23/10 01:10 AM

for advancedDatagrid we have GetCellData,SetcellData,SelectIndex method already.. Please let me know if we have methods to doubleclick particular index number..

Post Extras: Print Post   Remind Me!   Notify Moderator  
AskInformation
Newbie


Reged: 08/12/10
Posts: 1
Re: QTP Flex Datagrid Problem [Re: sameep]
      #638477 - 08/12/10 06:10 AM

I am having problem with retrieving the Column names for the FlexAdvancedDataGrid.
unable to get Column Name Headers.
Grid Hierarchy is as below.
Browser("MyApp").FlexApplication("Myapp").FlexBox("mybox").FlexBox("Umybox").FlexAdvancedDataGrid("mygrid")

Please help me in this.


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



Extra information
0 registered and 43 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: 8861

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5