I have been trying to select a specific value of an Input selector on a webpage, without success
Below is the code (part of a much larger automation script) to find the input element which is successful. But have tried various input value selection methods with no success.
A solution would be most welcome
see also image snippets of html and input screenshots
' find & select Released Prices
Set htmlColl = objInternetPage.getelementsbytagname("input")
For Each htmlInput In htmlColl
Select Case htmlInput.ClassName
Case "x-form-text x-form-field x-combo-noedit"
If htmlInput.Value = "Not released prices" Then
Set objInput = htmlInput
Exit For
End If
End Select
Next htmlInput
If objInput Is Nothing Then Stop
' Input has 2 values - item 0 = Released prices, and item 1 = Not released prices (default value)
' but cant select the list item
' like this
objInput.selectedindex = 0
' or like this
objInput.parentelement.Children.Item(1).selectedindex = 0
' this allows activation of the dropdown selector arrow
objInput.parentelement.Children.Item(1).Click
' but cant select the list item like this
objInput.parentelement.Children.Item(1).selectedindex = 0
' tried this to select Released prices - but no success (populates the input with the value, but does not change the input selection to Released prices item)
objInput.Value = "Released prices"
objInput.fireevent ("onchange")
Bookmarks