Automated website login with Firefox

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Karner
Posts: 13
Joined: 25 Nov 2018, 04:12

Automated website login with Firefox

Post by Karner » 10 May 2021, 11:52

Hello,

there are several tutorial (DOM) for such purpose with IE but not for Firefox/ Windows.

I want an automated calling and login to a specific website, providing the needed credentials User/password.
Login form is this one:

Code: Select all

<form action="index.php" method="POST" name="loginform" id="loginform">
                        <div>
                <label for="login">Kennung</label><br>
                <input type="text" name="login" value="" autocomplete="username" required="" autofocus="">
            </div>
            <div>
                <label for="pwd">Passwort</label><br>
                <input type="password" name="pwd" autocomplete="current-password" required="">
            </div>
            <div class="login_middle_container">
                <div class="login_middle_container_button">
                    <button type="submit" name="btnlogin" value="submit" class="buttoncolor">Anmelden</button>
                </div>
                <div>
                    <div>
                    <label>Sprache</label><br>
                    <select onchange="js:document.forms['loginform'].submit();" name="configOptionSelect"><option value="dutch.php">Niederländisch</option><option value="english.php">Englisch</option><option value="french.php">Französisch</option><option value="hungarian.php">Ungarisch</option><option value="italian.php">Italienisch</option><option selected="" value="german.php">Deutsch</option></select>                </div>
                </div>
            </div>
            <div>
                        </div>
            <div class="login_lower_container">
                <div></div>
                <div class="version">
                6.12.10                </div>
            </div>
        </form>
So website must be called by Firefox (Run, WinWaitActive), tab must be activated and input <input type="text" name="login" value="" autocomplete="username" required="" autofocus=""> must be found and focused.

Main problem is to find this input field. Using FF Tab navigation is not wanted because result isn't proper in all attemps.

Code: Select all

SendInput USER{tab}PASSWORD{enter}
is working, but sometimes wrong fields are filled because of wrong/not focussed primary field 'login'. So controlling of proper form field login is necessary.

SendInputToField would be my bst friend... 8-)

Thanks for help, regards!

Return to “Ask for Help (v1)”