Forum Discussion
vadaliprasad
13 years agoOccasional Contributor
Hi Tanya,
We found a solution for this.
Here is how we achieved this:
Set containerObj=Nothing
propNames = Array("ObjectLabel","ObjectType")
propValues = Array("allPropertyTabsList","CustomSparkListComponent")
set containerObj = frameObj.FindChild(propNames,propValues,3)
For i = 0 to containerObj.FlexObject.dataProvider.length-1
ItemText(i)=containerObj.FlexObject.dataProvider.source.item(i).tabName
Set Project.Variables.opObj = Nothing
propNames = Array("ObjectType", "FlexObject.data.tabName")
propValues = Array("ListItem", ItemText(i))
Set Project.Variables.opObj = containerObj.FindChild(propNames, propValues, 2)
Project.Variables.opObj.FlexObject.setVisible(1)
If Project.Variables.opObj.exists Then
If containerObj.FlexObject.dataProvider.source.item(i).selected="True" Then
Log.Message "Required Property Panel '"&ItemText(i)&"' already selected"
call logs(sHTML,functionName,"Required Property Panel '"&ItemText(i)&"' already selected","Pass")
Else
Call Project.Variables.opObj.Click(10,10)
End If
End if
Next
Please suggest if there is better way of achieving this functionality
We found a solution for this.
Here is how we achieved this:
Set containerObj=Nothing
propNames = Array("ObjectLabel","ObjectType")
propValues = Array("allPropertyTabsList","CustomSparkListComponent")
set containerObj = frameObj.FindChild(propNames,propValues,3)
For i = 0 to containerObj.FlexObject.dataProvider.length-1
ItemText(i)=containerObj.FlexObject.dataProvider.source.item(i).tabName
Set Project.Variables.opObj = Nothing
propNames = Array("ObjectType", "FlexObject.data.tabName")
propValues = Array("ListItem", ItemText(i))
Set Project.Variables.opObj = containerObj.FindChild(propNames, propValues, 2)
Project.Variables.opObj.FlexObject.setVisible(1)
If Project.Variables.opObj.exists Then
If containerObj.FlexObject.dataProvider.source.item(i).selected="True" Then
Log.Message "Required Property Panel '"&ItemText(i)&"' already selected"
call logs(sHTML,functionName,"Required Property Panel '"&ItemText(i)&"' already selected","Pass")
Else
Call Project.Variables.opObj.Click(10,10)
End If
End if
Next
Please suggest if there is better way of achieving this functionality