Imacros - CSV Loop Login

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
kamimipt
Posts: 9
Joined: Thu Aug 17, 2017 2:06 pm

Imacros - CSV Loop Login

Post by kamimipt » Tue Sep 05, 2017 8: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 ?
chivracq
Posts: 8874
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Imacros - CSV Loop Login

Post by chivracq » Tue Sep 05, 2017 11: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
[/b]

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply