Typing information from a list

Asked by Stacey Cochran

We are looking for a way to pull information from a csv file for a registration process. Each page in the registration will have all the same information, with the exception of the email address, which we want to pull from a csv file. So it would open registration page, enter an email from the csv file, enter a generic password and verify password (same for all entries) and the same answer to a registration question and information, complete the registration and enter another, this time using the next email in the list. I can manage all put entering the information from the list....any help?

Question information

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

I understand your goals.

But what are your questions?

Hope you do not mean, that we write your script.

What have you done so far?

Revision history for this message
Stacey Cochran (staceman3) said :
#2

I was hoping :)

Actually, just pointing me where to find the documentation on referencing a text file, entering the data line, advancing a line, etc...

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

These are basic Python features. (http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files)
You need some basic Python knowledge.

csv = open("path-to-csv-file)

csv.readlines() # returns all records as list

csv.close() # closes the file

csv.readline() # returns the next line, None if no more there

The rest is looping and string handling.

Can you help with this problem?

Provide an answer of your own, or ask Stacey Cochran for more information if necessary.

To post a message you must log in.