02-18-2011, 02:19 AM
Hi Laksh,
While automating the SRM shopping cart functionality I also faced similar kind of issue while identifying a product type from the drop down. In the recording QTP has identified the object as SAPList but it was failing while execution.
When I used the object spy the drop down was made up of a web edit and the drop down options were as web elements which were embaded into a web table which was the part of the frame in which the SAP list object was there.
To solve this I used descriptive programming, in which I have used the childObjects method to get the child object and then selecting a particular option. The snippet for the code is as follows,
Hope this might help you to resolve the issue. This is working fine for me.
-Shailendra
While automating the SRM shopping cart functionality I also faced similar kind of issue while identifying a product type from the drop down. In the recording QTP has identified the object as SAPList but it was failing while execution.
When I used the object spy the drop down was made up of a web edit and the drop down options were as web elements which were embaded into a web table which was the part of the frame in which the SAP list object was there.
To solve this I used descriptive programming, in which I have used the childObjects method to get the child object and then selecting a particular option. The snippet for the code is as follows,
Code:
' Creating a description object for web table identification
Dim objTable
Set objTable=Description.Create
objTable("name").value="WebTable"
objTable("innertext").value="MaterialService"
set childObjectFrame=Browser("Shop - SAP NetWeaver Portal").Page("Shop - SAP NetWeaver Portal").Frame("Frame").ChildObjects(objTable)
'msgbox childObjectFrame.count
'Creating a description for material web element
Dim objMaterialElement
Set objMaterialElement=Description.Create
objMaterialElement("micClass").value="WebElement"
objMaterialElement("innertext").value="Material"
objMaterialElement.click
Hope this might help you to resolve the issue. This is working fine for me.
-Shailendra