Jump to content

Recommended Posts

Posted

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

Posted

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.

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
×
×
  • Create New...