Copy link to clipboard
Copied
I have several problems working with the FLEX 4 QTP plug-in:
1. It is impossible to add the object FlexAdvancedDataGrid to QTP Object Repository.
2. The method of FlexAdvancedDataGrid GetAutomationChildAt is not working in the proper way
e.g I’m trying to read column names in advanced data grid in the next manner :
arrColNames(i) = objFlexDataGrid.GetAutomationChildAt(i).GetROProperty("automationvalue")
and Run Error is popped up.
3. The method FlexAdvancedDataGrid.getChildObject is not working at all.
Copy link to clipboard
Copied
Hi
There doesnt seem to be any problem with adding the AdvancedDatagrid component to QTP's object repository. Please log a bug with an attached sample if you are still facing the same http://bugs.adobe.com/jira/secure/Dashboard.jspa
As for being able to retrieve coloumn header names of the AdvancedDatagrid there is currently no API that allows us to do the same.You can log an enhancement request for that http://bugs.adobe.com/jira/secure/Dashboard.jspa
If you are looking at retrieving celldata of the ADG you can do that easily by
aa=Browser("Browser").SparkApplication("Main").FlexAdvancedDataGrid("myADG").GetAutomationChildAt(0).getROProperty("automationname")
msgbox aa
CellContents =Split(aa,"*",-1)
msgbox(CellContents(1))
Hope this helps!
Regards
Shanaz
Copy link to clipboard
Copied
Hi
Thank you very much for answering.
Do you have any idea why the method ChildObjects to get all the child objects of FlexAdvancedDataGrid is not working with ADG.
Thank you
Copy link to clipboard
Copied
Hi
There doesn’t seem to be a problem with the ChildObjects method of FlexAdvancedDatagrid.
Please find a sample below
Dim oMatches
Set oMatches =Browser("Browser").SparkApplication("Main").FlexAdvancedDataGrid("myADG").ChildObjects
For i=0 to oMatches.count
msgbox oMatches(i).getROProperty("automationname")
Next
Hope this helps
Regards
Shanaz
Copy link to clipboard
Copied
Hi
Thank you very much for helping me
I tried your code :
Dim objFlexTable
Set objFlexTable = Browser("Browser").SparkApplication("ECNApp").SparkBorderContainer("automationname:=sessDetails","automationindex:=index:9","automationclassname:=SparkBorderContainer").FlexAdvancedDataGrid("automationname:=_SessionDetails_MyADG1","automationindex:=index:12" ,"automationclassname:=FlexAdvancedDataGrid").ChildObjects
For i = 0 to objFlexTable.Count
objFlexTable(i).getROProperty("automationname")
Next
While debugging this code next exception have been popped-up
What version of Flex do you use?
Thanks
Copy link to clipboard
Copied
Hi
I tried to debug your code example
Dim aa
aa=Browser("Browser").SparkApplication("ECNApp").SparkBorderContainer("index:8").FlexAdvancedDataGrid("dg1").GetAutomationChildAt(0).getROProperty("automationname")
msgbox aa
CellContents =Split(aa,"*",-1)
msgbox(CellContents(1))
The Next error message have been popped-up:
Copy link to clipboard
Copied
Hi
The code sample I sent works fine with my application. Can you please log a bug in our public bugbase http://bugs.adobe.com/jira/secure/Dashboard.jspa
And provide me with your sample mxml application and steps to reproduce so that I can investigate further.
Regards
Shanaz
http://shanazvakil.wordpress.com/