Reputation: 417
have a small Problem to choose a value ID in special Dropdown Box with iMacros. The Dropdown is on mrssporty.de/. It's the first Box in the main Fomular for Selecting the Club.
I have the the Value Ids like this:
<select id="clubUid" name="form66[clubUid]" class="form-control select select2 select2init">
<option value="">PLZ oder Ort eingeben *</option>
<option value="1139" >Aalen (73430, Bahnhofstraße 8)</option>
<option value="26" >Ahrensburg (22926, Grosse Strasse 2)</option>
<option value="27" >Aichach (86551, Augsburgerstr. 17)</option>
<option value="1128" >Altötting (84503, Marienstr.3)</option>
<option value="29" >Alzey (55232, Berliner Strasse 3)</option>
and want to choose one value above with iMacros like
TAG POS=1 TYPE=SELECT FORM=* ATTR=ID:select2-drop CONTENT=$1139
Upvotes: 1
Views: 1311
Reputation: 3547
Use these settings in Recording Options.
https://i.sstatic.net/3uurJ.png
And record selection of drop down.
If you have multiple dropdowns and u want to do them all you can record 2 or 3. Then you can see which number inside () is changing. Then place !LOOP inside that number.
(!LOOP)
With little work u will see what I mean.
Upvotes: 1
Reputation: 417
actually i solved it like that
EVENT TYPE=MOUSEDOWN SELECTOR="#select2-chosen-3" BUTTON=0
CLICK X=646 Y=267
wait seconds=1
EVENTS TYPE=KEYPRESS SELECTOR="#s2id_autogen3_search" CHARS="12587"
EVENTS TYPE=KEYPRESS SELECTOR="#s2id_autogen3_search" KEYS="[13,13]"
But its not really smart. Anyone a better Idea?
Upvotes: 0