Create a short way to save typing script over and over....

F

frankrentef

I have a statement "url = 'http://xyzserver/'" so in my code every
time I need to use xyzserver I state "url +...."

What I' m now trying to do is create a call to a login process. The
script for the login process is below. I'd like to call "adminlogin"
and not have to keep entering the same several lines of script each
and everytime (I'm testing various login functions and rule changes.)

I'm a newbie, can someone walk me through this?

THNX



#Login to ISeDeposit Admin

ie.navigate (url + 'isweb/admin/default.aspx')
ie.textBoxSet ('AdminLogin1:Username','Admin')
ie.textBoxSet ('AdminLogin1:inputPassword','Password')
ie.buttonClick ('AdminLogin1:btnLogin')
 
B

Bruno Desthuilliers

frankrentef a écrit :
I have a statement "url = 'http://xyzserver/'" so in my code every
time I need to use xyzserver I state "url +...."

What I' m now trying to do is create a call to a login process. The
script for the login process is below. I'd like to call "adminlogin"
and not have to keep entering the same several lines of script each
and everytime (I'm testing various login functions and rule changes.)

I'm a newbie, can someone walk me through this?

I guess there's a section about functions somewhere in the tutorial ?
 
S

Sean DiZazzo

I have a statement "url = 'http://xyzserver/'"  so in my code every
time I need to use xyzserver I state "url +...."

What I' m now trying to do is create a call to a login process.  The
script for the login process is below.  I'd like to call "adminlogin"
and not have to keep entering the same several lines of script each
and everytime (I'm testing various login functions and rule changes.)

I'm a newbie, can someone walk me through this?

THNX

#Login to ISeDeposit Admin

ie.navigate (url + 'isweb/admin/default.aspx')
ie.textBoxSet ('AdminLogin1:Username','Admin')
ie.textBoxSet ('AdminLogin1:inputPassword','Password')
ie.buttonClick ('AdminLogin1:btnLogin')

def login(url):
ie.navigate (url + 'isweb/admin/default.aspx')
ie.textBoxSet ('AdminLogin1:Username','Admin')
ie.textBoxSet ('AdminLogin1:inputPassword','Password')
ie.buttonClick ('AdminLogin1:btnLogin')


login("http://xyzserver/")

Maybe?

~Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top