-1

I am automating this url-

_http://graphic-dl.com/postsend?PostId=34026

Here is my code:

#include <IE.au3>
Local $oIE = _IECreate("http://graphic-dl.com/postsend?PostId=34026")
Local $oForm = _IEFormGetObjByName($oIE, "form0")
Local $oText = _IEFormElementGetObjByName($oForm, "Name")
_IEFormElementSetValue($oText, "meethayaam")
Local $oText = _IEFormElementGetObjByName($oForm, "email")
_IEFormElementSetValue($oText, "meethayaam@gmail.com")
Sleep(2000)
_IEFormSubmit($oForm)

The code works fine. But, on submit, it gives an error like this:

"C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1458) : ==> The requested action with this object has failed.: $oObject.submit() $oObject^ ERROR ->17:41:43 AutoIt3.exe ended.rc:1

It filled 2 fields, but was unable to submit. Have you any idea why it does not work?

I already implemented _IEAction, and tried my best.

1 Answers1

0

I am not sure why that doesn't work but this does:

#include <IE.au3>
Local $oIE = _IECreate("http://graphic-dl.com/postsend?PostId=34026")
Local $oForm = _IEFormGetObjByName($oIE, "form0")
Local $oText = _IEFormElementGetObjByName($oForm, "Name")
_IEFormElementSetValue($oText, "meethayaam")
Local $oText = _IEFormElementGetObjByName($oForm, "email")
_IEFormElementSetValue($oText, "meethayaam@gmail.com")
Sleep(2000)
Local $oButton = _IEGetObjById($oIE, "submit")
$oButton.click()
garbb
  • 679
  • 5
  • 9