summaryrefslogtreecommitdiff
path: root/tests/examplefiles/autoit_submit.au3
blob: 84fb71503303fb0aa11d560ebe8c22f23af307c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <IE.au3>
;http://msdn.microsoft.com/en-us/library/Aa752084.aspx
$ourl="http://localhost:5000/"

$oIE = _IEAttach ($ourl,"url")
If @error = $_IEStatus_NoMatch Then
	$oIE = _IECreate ($ourl & "sample.html")
endIf

$oForm = _IEFormGetObjByName ($oIE, "form1")
;username, call DOM directly
$oIE.document.getElementById("username").value="helloAutoIT"
;state select
$oSelect = _IEFormElementGetObjByName ($oForm, "state")
_IEFormElementOptionSelect ($oSelect, "S2", 1, "byText")
;options raido
_IEFormElementRadioSelect($oForm, "2nd", "type", 1, "byValue")

#cs
ConsoleWrite(@Error)
Sleep(10000)
#ce
_IEFormSubmit($oForm, 0)
_IELoadWait($oIE)
Sleep(60000)
_IEQuit($oIE)