Selecting a value from SAPList
I am working on automating a WebDynpro application. I am trying to select a value from the SAPList. I have tried a few different approaches but nothing seems to be working. Any input about this would be appreciated. Here are the things I have tried;
This SAPList is nested in a webtable and has the list options as WebElements
1. Set sObject = Browser("ABC").Page("ABC").Frame("ABC").SAPList("A BC").Object
sObject.setAttribute "value", strValToSet
'Make sure the right value is selected
strSelectedItem = oObj.getROProperty("selection")
If Trim(strSelectedItem) = Trim(strValToSet) Then
Reporter.ReportEvent MicPass,"Check if right value is set","The right value ["&strSelectedItem&"] was set"
- In this case, I can see that the value is set in the SAPList, but when I do the action like Continue to go to the next page for which I made the selection, it doesn't take me to the page that it soudl take me to based on my selection. It instead takes me to whatever has been selected by default in the SAPList.
2. intU = Postion of required option in SAPList
For i = 1 to intPos
set WshShell = CreateObject("WScript.Shell")
If i = intPos Then
- This also takes me to the page based on default selection in SAPList.
3. I have tried setting the default value to what I want to select, but that did not work either.
see if any of them help you
Technology Tree - Automation: QTP - Unable to select Weblist in QTP
Also can you capture request before hitting server and post here?
I have not used QTP with SAP for a while. I think that there is a SAP Add-On. Then the SAP objects communicated better with it installed.
How about using the plain vanilla .SET "ITEM In List" ?