writing the content of an excel value into a dropdown menu

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

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.

writing the content of an excel value into a dropdown menu

by Thrilling on Tue Aug 22, 2017 8:34 am

Hello,

I'm using iMacros 8.9.7 on FIrefox 45.9.0 ESR on Solaris 11.3 (x64, german)

My problem concerns this website:
https://visa.kdmid.ru/

my problem is on the fourth page of this visa application which sadly means you'll have to fill in some bogus data to reach it
How to get there:
1. select "germany" in the first dropdown menu, "deutsch" in the second, mark the checkbox and press "Neuen Antragsformular ausfüllen"
2. click "Weiter"
3. select and input random data here, expect for the two bottom dates, which have to be logical (ie. 01.12.2017 and 01.01.2018)

On this page I'd like to make an automated selection of the dropdown menu "Sex". I either have the value "M" (for male) or "F" (for female) in my excel, and I'd like iMacros to make the correct selection depending on the value. I'm thinking the simplest approach would be to tell iMacros to "type" the content into the dropdown menu, if that's possible, but i don't know what the command would look like.

For reference: Manually selecting Male from the menu looks like this:
Code: Select all
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%M


i tried this, but it didn't work:
Code: Select all
TAG POS=1 TYPE=input:text FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT={{!COL3}}


Any help would be greatly appreciated
Thrilling
 
Posts: 20
Joined: Fri Aug 11, 2017 7:02 am

Re: writing the content of an excel value into a dropdown me

by chivracq on Tue Aug 22, 2017 9:30 am

Thrilling wrote:Hello,

I'm using
Code: Select all
iMacros 8.9.7 on FIrefox 45.9.0 ESR on Solaris 11.3 (x64, german)


My problem concerns this website:
https://visa.kdmid.ru/

my problem is on the fourth page of this visa application which sadly means you'll have to fill in some bogus data to reach it
How to get there:
1. select "germany" in the first dropdown menu, "deutsch" in the second, mark the checkbox and press "Neuen Antragsformular ausfüllen"
2. click "Weiter"
3. select and input random data here, expect for the two bottom dates, which have to be logical (ie. 01.12.2017 and 01.01.2018)

On this page I'd like to make an automated selection of the dropdown menu "Sex". I either have the value "M" (for male) or "F" (for female) in my excel, and I'd like iMacros to make the correct selection depending on the value. I'm thinking the simplest approach would be to tell iMacros to "type" the content into the dropdown menu, if that's possible, but i don't know what the command would look like.

For reference: Manually selecting Male from the menu looks like this:
Code: Select all
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%M


i tried this, but it didn't work:
Code: Select all
TAG POS=1 TYPE=input:text FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT={{!COL3}}


Any help would be greatly appreciated

Without looking at your Site / trying to reach that Page, but if iMacros records:
Code: Select all
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%M

=> Then if you have "M"/"F" in your DataSource, iMacros expects then the following Syntax:
Code: Select all
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%{{!COL3}}
- (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: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: writing the content of an excel value into a dropdown me

by Thrilling on Tue Aug 22, 2017 11:57 pm

works like a charm!

Thank you very much.

Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Address.csv
SET !DATASOURCE_LINE 2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_SurnameLat_TextBox CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_NamesLat_TextBox CONTENT={{!COL3}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Surnames_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%{{!COL4}}
Thrilling
 
Posts: 20
Joined: Fri Aug 11, 2017 7:02 am

Re: writing the content of an excel value into a dropdown me

by chivracq on Wed Aug 23, 2017 2:50 am

Thrilling wrote:works like a charm!

Thank you very much.

Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !DATASOURCE_DELIMITER ;
SET !DATASOURCE Address.csv
SET !DATASOURCE_LINE 2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_SurnameLat_TextBox CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_NamesLat_TextBox CONTENT={{!COL3}}
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Surnames_Condition_List CONTENT=%0
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_phBody_StepViewMPersonalDetailsStep_Sex_List CONTENT=%{{!COL4}}

:D :D
- (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: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 8 guests

-->