Imacros - CSV Loop Login

Discussions and Tech Support related to the iMacros Google Chrome extension.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Imacros - CSV Loop Login

by kamimipt on Tue Sep 05, 2017 1:44 pm

Hello guys i'd like your help fixing this pls :D
I'm tryingo to get the information from a CSV file with 3 columns
1st one is irrelevant, 2nd is the username and 3rd the password.


SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !ENCRYPTION NO

TAB T=1
SET !DATASOURCE login.csv
SET !DATASOURCE_COLUMNS 3
SET !LOOP 0
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:user CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=ID:password CONTENT={{!COL3}}
TAG POS=2 TYPE=A ATTR=TXT:Acesso


When i run this piece of code i have an error: "TypeError: Cannot read property '2' of undefined, line: 16"

Any thoughts ?
kamimipt
 
Posts: 8
Joined: Thu Aug 17, 2017 7:06 am

Re: Imacros - CSV Loop Login

by chivracq on Tue Sep 05, 2017 4:55 pm

kamimipt wrote:Hello guys i'd like your help fixing this pls :D
I'm tryingo to get the information from a CSV file with 3 columns
1st one is irrelevant, 2nd is the username and 3rd the password.

Code: Select all
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !ENCRYPTION NO

TAB T=1
SET !DATASOURCE login.csv
SET !DATASOURCE_COLUMNS 3
SET !LOOP 0
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:user CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=ID:password CONTENT={{!COL3}}
TAG POS=2 TYPE=A ATTR=TXT:Acesso


When i run this piece of code i have an error:
Code: Select all
"TypeError: Cannot read property '2' of undefined, line: 16"


Any thoughts ?

CIM...! :mrgreen: (Read my Sig...) => Applies to your 1st Thread as well...

Try to select the correct Thread when you open a Thread, this is the 2nd Thread you open in a wrong Sub-Forum, your 2 Threads have nothing specific to iMacros for CR only..., especially if you don't even mention your FCI...! (But no need to duplicate now...)

+ What Line is Line 16 (as 5 Lines are missing from your truncated Script...)?

Do you get the same Pb with the 'Loop-Csv-to-Web.iim' Demo-Macro...?

(Even if I already know the Answers for those 2 Qt's, and the (obvious) Solution to your Pb...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Chrome

Who is online

Users browsing this forum: No registered users and 4 guests

-->