How to parameterize a login page using Sikuli IDE

Asked by Lokesh

I need to parametrize my login page with 20 different user name and password how to do it using sikuli IDE

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

put your 20 logins into a textfile like this
name password
name password
...

in your script:

logins = []
f = open("path to your textile")
for line in f.readlines():
    (n, p) = line.strip().split()
    logins.append([n.strip(), p.strip()]}

now you have a list of 20 name-password-pairs, that you can use to fill in.

if your names and/or passwords contain whitespace characters, the you have to use a unique separator, that does not show up in the names or password (e.g. | )

a line in your textfile:
name | password

and the relevant script line:
    (n, p) = line.strip().split("|")

Revision history for this message
Lokesh (testcomo02) said :
#2

Hi RaiMan,

Thanks for your solution.
Is their any document that helps me to know the complete functions from the scratch as am new for this Sikuli.
To work on this what are the other dependence need to known.

Kind Regards,
K.Lokesh

Revision history for this message
RaiMan (raimund-hocke) said :
#3