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

Posted
  On 7/15/2013 at 6:16 PM, dar100111 said:

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')
Posted

  On 7/15/2013 at 6:24 PM, danwilli said:

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.

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
  • Recently Browsing   0 members

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