Jump to content

How to set value to a textarea on a site, when it can't find the formname.


Go to solution Solved by DW1,

Recommended Posts

It was showing 'main' as one of the frame names. It find's an object named 'main' but not a form name. I just tried that out of curiosity.

Oh LMAO, this is my mistake, not yours... I typo'd and used _IEFormGetObjByName instead of _IEFrameGetObjByName, my apologies.

Try this (post the console output if it doesn't work):

#include <IE.au3>
Local $sURL = 'C:\Scripts\TEST\test.html'
Local $oIE = _IECreate($sURL)
Local $oFrame = _IEFrameGetObjByName($oIE, 'main')
Local $oForm = _IEFormGetObjByName($oFrame, '_ctl0')
Local $oTextArea = _IEFormElementGetObjByName($oForm, 'myPronList')
_IEFormElementSetValue($oTextArea, 'myPronList is a funny name')
Link to comment
Share on other sites

Oh LMAO, this is my mistake, not yours... I typo'd and used _IEFormGetObjByName instead of _IEFrameGetObjByName, my apologies.

 

Try this (post the console output if it doesn't work):

#include <IE.au3>
Local $sURL = 'C:\Scripts\TEST\test.html'
Local $oIE = _IECreate($sURL)
Local $oFrame = _IEFrameGetObjByName($oIE, 'main')
Local $oForm = _IEFormGetObjByName($oFrame, '_ctl0')
Local $oTextArea = _IEFormElementGetObjByName($oForm, 'myPronList')
_IEFormElementSetValue($oTextArea, 'myPronList is a funny name')

You are a man among men Dan! I see my text being input now.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...