Hi All,
I have a question related to _IEFormElementOptionSelect in the reference file. This drop down contains three items; Homepage, Midipage, Freepage.
How can I get the name of these items? If I use .innertext, in another drop down list contains spaces, so I cannot split them.
; Open a browser with the form example, get reference to form, get reference
; to select element, cycle 10 times selecting options byValue, byText and byIndex
#include <IE.au3>
Local $oIE = _IE_Example("form")
Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
Local $oSelect = _IEFormElementGetObjByName($oForm, "selectExample")
_IEAction($oSelect, "focus")
For $i = 1 To 10
_IEFormElementOptionSelect($oSelect, "Freepage", 1, "byText")
Sleep(10)
_IEFormElementOptionSelect($oSelect, "midipage.html", 1, "byValue")
Sleep(10)
_IEFormElementOptionSelect($oSelect, 0, 1, "byIndex")
Sleep(10)
Next
_IEQuit($oIE)
;== Question ==
$aItems = StringSplit($oSelect.innerText, " ")
For $i = 1 To $aItems[0] - 1
ConsoleWrite("Item-" & $i & ": " & $aItems[$i] & @CRLF)
Next