sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #17694
Re: [Question #227987]: How to parameterize a login page using Sikuli IDE
Question #227987 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/227987
Status: Open => Answered
RaiMan proposed the following answer:
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("|")
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.