Jump to content

IE Automation


Recommended Posts

Hello,

If anyone can help, it would be greatly appreciated. The code is just an example and similar to the issue with an internal webpage. I'm trying to autofill than click the submit button. I get the same error running the script.

_IEFormElementSetValue, $_IESTATUS_InvalidObjectType

IEGetObjById, $_IESTATUS_NoMatch

Is it possible to edit the <textarea></textarea>  field with AutoIt?  If anyone could assist me on how. Than I could have a better understanding and chance in figuring it out on my main script. Thank you

#include <IE.au3>

Local $oIE1 = _IECreate ("https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea")
_IELoadWait($oIE1)
local $oFormCollection = _IEFormGetCollection($oIE1,0)
local $oid = _IEGetObjByid($oFormCollection, "iframeResult")
_IEFormElementSetValue($oid, "test")

sleep (2000)

Local $oIE2 = _IECreate ("https://www.w3schools.com/html/tryit.asp?filename=tryhtml_scripts_intro")
_IELoadWait($oIE2)
$oForm2 = _IEFormGetCollection($oIE2,0)
$oClickMe = _IEGetObjById($oForm2, "demo")
_IEAction($oClickMe, "focus")
_IEAction($oClickMe, "click")

Element.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...