Sign in to follow this  
Followers 0
tester4

Form submission in IE

11 posts in this topic

How do i get the form name from any website?

Its a login page and i wish to use this "_IEFormGetObjByName" and related functions from ie.au3

The function takes in form name as parameter, how do i know that and the names for fields in the form

Share this post


Link to post
Share on other sites



How do i get the form name from any website?

Its a login page and i wish to use this "_IEFormGetObjByName" and related functions from ie.au3

The function takes in form name as parameter, how do i know that and the names for fields in the form

Use AutoIt Window Info

Share this post


Link to post
Share on other sites

Use AutoIt Window Info

ya i have tried that, dint understand where to look for in the window info for form name and field names

Share this post


Link to post
Share on other sites

Drag the crosshair over the titlebar of IE...

buddy, i ve used window info tool to get window names n button names and instances; here te problem is to get the name of the form and fields in the form on IE page.

check the following ex in autoit help page which uses hotmail login n gives form name:

$oIE = _IECreate ("http://www.hotmail.com")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

how have they given the name of form as "f1", thats my concern

please help

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

buddy, i ve used window info tool to get window names n button names and instances; here te problem is to get the name of the form and fields in the form on IE page.

check the following ex in autoit help page which uses hotmail login n gives form name:

$oIE = _IECreate ("http://www.hotmail.com")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

how have they given the name of form as "f1", thats my concern

please help

Ok, now I've understood your problem.

The names of the form and form elements can be found by viewing the page HTML source. Right click->View Source Code. :)

Edited by Kiti

Share this post


Link to post
Share on other sites

There are many ways... be careful with View Source as it shows you the page source before client-side processing (dynamic HTML)... my suggestion is DebugBar (see my sig).

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Ok, now I've understood your problem.

The names of the form and form elements can be found by viewing the page HTML source. Right click->View Source Code. :)

Yup, solved.. Thank You

Share this post


Link to post
Share on other sites

There are many ways... be careful with View Source as it shows you the page source before client-side processing (dynamic HTML)... my suggestion is DebugBar (see my sig).

Dale

Yeah!! thanks for the tool info

Share this post


Link to post
Share on other sites

Yup, solved.. Thank You

Hmmm, now i need to automate the right click and select action itself :)..

I know to use click button , but then how do i click any option on right click contest menu, sat right click->property

Share this post


Link to post
Share on other sites

Hello folks,

I have a similar problem to solve. This is (part of) the code:

<tr>
    <td align="right">
        <label for="logfield">your e-mail
        </label>
    </td>
    <td>
        <input type="text" name="login" id="logfield" class="field" style="width:195px" value=""/><br />
    </td>
</tr>

<tr>
    <td align="right">
        <label for="passfield">password
        </label>
    </td>
    <td>
        <input type="password" name="password" id="passfield" class="field" style="width:195px" value=""/><br />
    </td>
</tr>

<tr>
    <td></td>
    <td class="small" nowrap="nowrap">
        <input type="checkbox" name="remember" id="remfield"  value="true" class="absmid"/>
        <label for="remfield">Remember me
        </label>
    </td>
</tr>

<tr>
    <td></td>
    <td style="padding:10px 0">
        <a href="java script:login();" class="btn3">
            <span>
                <span>
                    <span>Login
                    </span>
                </span>
            </span>
        </a>
    </td>
</tr>

I have to make a small piece of code to type in an eMail address and a password into "login" and "password" fields respectively, and then press "Login" button. No need to set/reset "remember" checkbox. That's all! What kind of code would best fit my needs? TIA.

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