Jump to content

Application Login


smita
 Share

Recommended Posts

I have written a script for login page of application which we are going to test :

#include <IE.au3>

$oIE = _IECreate ("http://12.44.178.188/",0,1,1)

$oForm = _IEFormGetCollection ($oIE, 0)

$oLogin = _IEFormElementGetObjByName($oForm, "login")

$oPass = _IEFormElementGetObjByName($oForm,"passwd")

_IEFormElementGetObjByName($oLogin,"login")

_IEFormElementGetObjByName($oPass,"passwd")

$USERNAME = 'username'

$PASSWORD = 'username'

_IEFormElementSetValue($oLogin,$USERNAME)

_IEFormElementSetValue($oPass,$PASSWORD)

_IEFormSubmit($oForm)

In this script login page is taking username but its not taking the password !

Password text box is below Username textbox

I have written a script for login page of application which we are going to test :

#include <IE.au3>

$oIE = _IECreate ("http://12.44.178.188/",0,1,1)

$oForm = _IEFormGetCollection ($oIE, 0)

$oLogin = _IEFormElementGetObjByName($oForm, "login")

$oPass = _IEFormElementGetObjByName($oForm,"passwd")

_IEFormElementGetObjByName($oLogin,"login")

_IEFormElementGetObjByName($oPass,"passwd")

$USERNAME = 'username'

$PASSWORD = 'username'

_IEFormElementSetValue($oLogin,$USERNAME)

_IEFormElementSetValue($oPass,$PASSWORD)

_IEFormSubmit($oForm)

In this script login page is taking username but its not taking the password !

Password text box is below Username textbox

$oPass = _IEFormElementGetObjByName($oForm,"passwd")

Should be

$oPass = _IEFormElementGetObjByName($oForm,"password")

if I'm not mistaken...

$oPass = _IEFormElementGetObjByName($oForm,"passwd")

Should be

$oPass = _IEFormElementGetObjByName($oForm,"password")

if I'm not mistaken...

Thank u !

Now it's taking password!

There are two buttons on the login page one is "Connect" & another is "Exit"

Want 2 click on "Connect" button but this script is not clicking any buttons!

Can u please help me in this?

Hi,I have written scirpt for login page of the application which we are going to test.

$oIE = _IECreate ("http://12.44.178.188/",0,1,1)

$oForm = _IEFormGetCollection ($oIE, 0)

$oLogin = _IEFormElementGetObjByName($oForm, "login")

$oPass = _IEFormElementGetObjByName($oForm,"password")

;$osignin = _IEFormElementGetObjByName ($oForm, "SI")

$USERNAME = 'admin'

$PASSWORD = 'admin'

_IEFormElementSetValue($oLogin,$USERNAME)

_IEFormElementSetValue($oPass,$PASSWORD)

_IEFormSubmit ($oForm)

In login page there are two buttons , "Connect" & "Exit" .

When I am running the script it's not clicking on the "Connect" button , so I am not getting the main page.

Can you please help me how to click on "Connect" button using this scirpt?

The name of the Connect button is "btnConnect", not "SI". Use that and then add

_IEAction($osignin, "click")

Recommend you get DebugBar (see my sig) to make this easier.

Dale

Edited by GaryFrost
Link to comment
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
 Share

  • Recently Browsing   0 members

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