05-08-2013, 06:42 PM
Hello
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.
This SAPList is nested in a webtable and has the list options as WebElements.
Here are the things I have tried;
1.
- 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.- 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.
Thanks
Niv
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.
This SAPList is nested in a webtable and has the list options as WebElements.
Here are the things I have tried;
1.
Code:
Set sObject = Browser("ABC").Page("ABC").Frame("ABC").SAPList("ABC").Object
sObject.focus
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"
End if
- 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.
Code:
intU = Postion of required option in SAPList
For i = 1 to intPos
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys"{DOWN}"
If i = intPos Then
WshShell.SendKeys "{ENTER}"
End If
Next
3. I have tried setting the default value to what I want to select, but that did not work either.
Code:
Browser("ABC").Page("ABC").Frame("ABC").SAPList("ABC").Object.defaultvalue="strValToSet"
Thanks
Niv