Sign in to follow this  
Followers 0
sumit

How to set value to this form element

4 posts in this topic

I want to fill username feild in the page "http://mail.uk2.net"

CODE
#include<IE.au3>

$oIE = _IECreate("http://mail.uk2.net",0,1,1,0)

$oForm=_IEFormGetCollection($oIE,0)

$oQuery = _IEFormElementGetObjByName($oForm, "username")

_IEFormElementSetValue($oQuery, "sumitnxt")

But i get this error

--> IE.au3 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

What am i doing wrong

Share this post


Link to post
Share on other sites



I want to fill username feild in the page "http://mail.uk2.net"

CODE
#include<IE.au3>

$oIE = _IECreate("http://mail.uk2.net",0,1,1,0)

$oForm=_IEFormGetCollection($oIE,0)

$oQuery = _IEFormElementGetObjByName($oForm, "username")

_IEFormElementSetValue($oQuery, "sumitnxt")

But i get this error

--> IE.au3 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType

What am i doing wrong

When i try this

CODE
#include<IE.au3>

$oIE = _IECreate("http://mail.uk2.net",0,1,1,0)

$oForm=_IEFormGetObjByName($oIE, "loginPage")

$oQuery = _IEFormElementGetObjByName($oForm, "username")

_IEFormElementSetValue($oQuery, "sumitnxt")

It works

but the problem is in first one you dont have to give name of the form ... which is very useful because so many times the source of html page doesnt have form name.

Share this post


Link to post
Share on other sites

Guys i figured it out ... i need to use IEformGetcollection($oIE,1)

Share this post


Link to post
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
Sign in to follow this  
Followers 0