Help selecting from a drop down list

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
ag5264
Posts: 7
Joined: Sat Jul 16, 2016 10:03 am

Help selecting from a drop down list

Post by ag5264 » Sat Jul 16, 2016 10:12 am

Hi guys,

I'm having an issue getting a macro to select a value from a drop down list and hoping for some help. I've read a lot of forum posts and the wiki pages but am still coming up short.

There are three drop down menus, one to select the day and the other two to select opening times. Recording the macro in the browser failed to reproduce the same results as select the values from the drop down. It essentially just freezes on the first drop down box and doesn't select anything. The code it recorded was:

Code: Select all

TAG POS=1 TYPE=DIV ATTR=ID:block-system-main
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=1 TYPE=LI ATTR=TXT:Open
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=1 TYPE=LI ATTR=TXT:8.00AM
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=2 TYPE=LI ATTR=TXT:5.00PM
Here is a snippet of the relevant html on the page that I'm struggling with:

Code: Select all

<div class="field-type-field-collection field-name-field-openinghours field-widget-field-collection-embed form-wrapper" id="edit-profile-profile-supplier-field-openinghours"><div id="profile-profile-supplier-field-openinghours-add-more-wrapper"><div class="form-item"><table id="field-openinghours-values" class="field-multiple-table sticky-enabled">
 <thead><tr><th colspan="2" class="field-label"><label>Supplier Availability </label></th><th>Order</th> </tr></thead>
<tbody>
 <tr class="draggable odd"><td class="field-multiple-drag"></td><td><b>Monday</b><div class="field-type-list-text field-name-field-text-openinghours field-widget-options-select form-wrapper" id="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours"><div class="form-item form-type-select form-item-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und">
  <label for="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und">Open/Closed </label>
 <select id="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und" name="profile_profile_supplier[field_openinghours][und][0][field_text_openinghours][und]" class="form-select"><option value="_none">- None -</option><option value="1">Open</option><option value="0">Closed</option></select>
</div>
</div><div class="field-type-list-text field-name-field-opening-time field-widget-options-select form-wrapper" id="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time"><div class="form-item form-type-select form-item-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und">
  <label for="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und">Opening Time </label>
 <select id="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und" name="profile_profile_supplier[field_openinghours][und][0][field_opening_time][und]" class="form-select"><option value="_none">- None -</option><option value="7">7:00AM</option><option value="7.25">7:15AM</option><option value="7.5">7:30AM</option><option value="7.75">7:45AM</option><option value="8">8:00AM</option><option value="8.25">8:15AM</option><option value="8.5">8:30AM</option><option value="8.75">8:45AM</option><option value="9">9:00AM</option><option value="9.25">9:15AM</option><option value="9.5">9:30AM</option><option value="9.75">9:45AM</option><option value="10">10:00AM</option><option value="10.25">10:15AM</option><option value="10.5">10:30AM</option><option value="10.75">10:45AM</option><option value="11">11:00AM</option><option value="11.25">11:15AM</option><option value="11.5">11:30AM</option><option value="11.75">11:45AM</option><option value="12">12:00PM</option><option value="12.25">12:15PM</option><option value="12.5">12:30PM</option><option value="12.75">12:45PM</option><option value="13">1:00PM</option><option value="13.25">1:15PM</option><option value="13.5">1:30PM</option><option value="13.75">1:45PM</option><option value="14">2:00PM</option><option value="14.25">2:15PM</option><option value="14.5">2:30PM</option><option value="14.75">2:45PM</option><option value="15">3:00PM</option><option value="15.25">3:15PM</option><option value="15.5">3:30PM</option><option value="15.75">3:45PM</option><option value="16">4:00PM</option><option value="16.25">4:15PM</option><option value="16.5">4:30PM</option><option value="16.75">4:45PM</option><option value="17">5:00PM</option><option value="17.25">5:15PM</option><option value="17.5">5:30PM</option><option value="17.75">5:45PM</option><option value="18">6:00PM</option><option value="18.25">6:15PM</option><option value="18.5">6:30PM</option><option value="18.75">6:45PM</option><option value="19">7:00PM</option><option value="19.25">7:15PM</option><option value="19.5">7:30PM</option><option value="19.75">7:45PM</option><option value="20">8:00PM</option><option value="20.25">8:15PM</option><option value="20.5">8:30PM</option><option value="20.75">8:45PM</option><option value="21">9:00PM</option></select>
</div>
Is anyone able to offer any insights or suggestions?

Thanks,
Jason
chivracq
Posts: 8424
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help selecting from a drop down list

Post by chivracq » Sat Jul 16, 2016 1:53 pm

ag5264 wrote:Hi guys,

I'm having an issue getting a macro to select a value from a drop down list and hoping for some help. I've read a lot of forum posts and the wiki pages but am still coming up short.

There are three drop down menus, one to select the day and the other two to select opening times. Recording the macro in the browser failed to reproduce the same results as select the values from the drop down. It essentially just freezes on the first drop down box and doesn't select anything. The code it recorded was:

Code: Select all

TAG POS=1 TYPE=DIV ATTR=ID:block-system-main
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=1 TYPE=LI ATTR=TXT:Open
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=1 TYPE=LI ATTR=TXT:8.00AM
TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
TAG POS=2 TYPE=LI ATTR=TXT:5.00PM
Here is a snippet of the relevant html on the page that I'm struggling with:

Code: Select all

<div class="field-type-field-collection field-name-field-openinghours field-widget-field-collection-embed form-wrapper" id="edit-profile-profile-supplier-field-openinghours"><div id="profile-profile-supplier-field-openinghours-add-more-wrapper"><div class="form-item"><table id="field-openinghours-values" class="field-multiple-table sticky-enabled">
 <thead><tr><th colspan="2" class="field-label"><label>Supplier Availability </label></th><th>Order</th> </tr></thead>
<tbody>
 <tr class="draggable odd"><td class="field-multiple-drag"></td><td><b>Monday</b><div class="field-type-list-text field-name-field-text-openinghours field-widget-options-select form-wrapper" id="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours"><div class="form-item form-type-select form-item-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und">
  <label for="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und">Open/Closed </label>
 <select id="edit-profile-profile-supplier-field-openinghours-und-0-field-text-openinghours-und" name="profile_profile_supplier[field_openinghours][und][0][field_text_openinghours][und]" class="form-select"><option value="_none">- None -</option><option value="1">Open</option><option value="0">Closed</option></select>
</div>
</div><div class="field-type-list-text field-name-field-opening-time field-widget-options-select form-wrapper" id="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time"><div class="form-item form-type-select form-item-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und">
  <label for="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und">Opening Time </label>
 <select id="edit-profile-profile-supplier-field-openinghours-und-0-field-opening-time-und" name="profile_profile_supplier[field_openinghours][und][0][field_opening_time][und]" class="form-select"><option value="_none">- None -</option><option value="7">7:00AM</option><option value="7.25">7:15AM</option><option value="7.5">7:30AM</option><option value="7.75">7:45AM</option><option value="8">8:00AM</option><option value="8.25">8:15AM</option><option value="8.5">8:30AM</option><option value="8.75">8:45AM</option><option value="9">9:00AM</option><option value="9.25">9:15AM</option><option value="9.5">9:30AM</option><option value="9.75">9:45AM</option><option value="10">10:00AM</option><option value="10.25">10:15AM</option><option value="10.5">10:30AM</option><option value="10.75">10:45AM</option><option value="11">11:00AM</option><option value="11.25">11:15AM</option><option value="11.5">11:30AM</option><option value="11.75">11:45AM</option><option value="12">12:00PM</option><option value="12.25">12:15PM</option><option value="12.5">12:30PM</option><option value="12.75">12:45PM</option><option value="13">1:00PM</option><option value="13.25">1:15PM</option><option value="13.5">1:30PM</option><option value="13.75">1:45PM</option><option value="14">2:00PM</option><option value="14.25">2:15PM</option><option value="14.5">2:30PM</option><option value="14.75">2:45PM</option><option value="15">3:00PM</option><option value="15.25">3:15PM</option><option value="15.5">3:30PM</option><option value="15.75">3:45PM</option><option value="16">4:00PM</option><option value="16.25">4:15PM</option><option value="16.5">4:30PM</option><option value="16.75">4:45PM</option><option value="17">5:00PM</option><option value="17.25">5:15PM</option><option value="17.5">5:30PM</option><option value="17.75">5:45PM</option><option value="18">6:00PM</option><option value="18.25">6:15PM</option><option value="18.5">6:30PM</option><option value="18.75">6:45PM</option><option value="19">7:00PM</option><option value="19.25">7:15PM</option><option value="19.5">7:30PM</option><option value="19.75">7:45PM</option><option value="20">8:00PM</option><option value="20.25">8:15PM</option><option value="20.5">8:30PM</option><option value="20.75">8:45PM</option><option value="21">9:00PM</option></select>
</div>
Is anyone able to offer any insights or suggestions?

Thanks,
Jason
Hum, I have some doubts about "I've read a lot of forum posts...": => CIM...! :mrgreen: (Always mention your FCI when you open a Thread, read my Sig (and the Forum Rules), many Commands are not implemented for all Browsers/Versions...)

Pff, and it's a bit difficult to want to help you without the URL of your Site/Page or some HTML Saveas of the Page uploaded to your Thread if it's behind Login & Password, but from a quick look at the Source Code you provided, your DDLB's look more or less "Standard" to me (i.e. with all Options declared in the Source, and not Dynamically retrieved by some JavaScript/Ajax Element), for which some "Standard" 'TYPE=SELECT' TAG Statement should work.

OK, best guess, try stg like:

Code: Select all

TAG POS=1 TYPE=DIV ATTR=ID:block-system-main
WAIT SECONDS=0.5
'>
'TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
'TAG POS=1 TYPE=LI ATTR=TXT:Open
TAG POS=1 TYPE=SELECT ATTR=ID:*field-text-openinghours* CONTENT=$Open
WAIT SECONDS=0.5
'>
'TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
'TAG POS=1 TYPE=LI ATTR=TXT:8.00AM
TAG POS=1 TYPE=SELECT ATTR=ID:*field-opening-time* CONTENT=$8:00AM
WAIT SECONDS=0.5
'>
'TAG POS=2 TYPE=SPAN ATTR=TXT:-<SP>None<SP>-
'TAG POS=2 TYPE=LI ATTR=TXT:5.00PM
TAG POS=1 TYPE=SELECT ATTR=ID:*field-closing-time* CONTENT=$5:00PM
WAIT SECONDS=0.5
I made up the "closing-time" based on "opening-time" as you didn't provide the Source for that 3rd DDLB...! :roll:

Depending on your FCI, you may want to try the EVENT Mode (not implemented for all Browsers/Versions...!) which usually works fine with "tricky" DDLB's...

Mention your FCI for me to follow up and provide URL/Saveas of your Page if you don't come out by yourself...
- (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...
Hallmaster
Posts: 3
Joined: Thu Aug 11, 2016 10:10 am

Re: Help selecting from a drop down list

Post by Hallmaster » Thu Aug 11, 2016 12:28 pm

Hi Chivracq

Firstly apologies for any incorrect protocol - I'm new to this!!! :oops:

I have read through this thread and think is a similar problem to what I am experiencing so would very much appreciate any help or guidance.

I have a form for creating Customers on our website and have managed to link the form to a CSV file and get the entries to automatically load into all the relevant fields but am getting stuck when it comes to the drop menu. The macro highlights the last fields but isn't selecting them or matching them up from the CSV file. In the code this is line 26.

If done manually, you have to select the Hall field before the other options appear in the other two drop menus, if that helps!! In case it needs a number instead of a name, the number of the Hall is 1697 (Account Id 1259)

Are you able to help with this one please? Attached is the spreadsheet with samples, the code for the imacro and the code for the page with the form. The site url does need a username and password to log in if you are unable to see where I'm going wrong from the info supplied.

VERY Much appreciated in advance - Bernard
Attachments
iMacro screen shots.zip
Contains the three files listed in the post.
(26.05 KiB) Downloaded 134 times
Hallmaster
Posts: 3
Joined: Thu Aug 11, 2016 10:10 am

Re: Help selecting from a drop down list

Post by Hallmaster » Fri Aug 12, 2016 11:15 am

Hi- I've managed to get the macro to select the Hall now by changing the code to use
TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:btnACT
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Hall_0__HallTypeId CONTENT=%1458
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__ActivityTypeId CONTENT=$*{{!COL13}}*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Activity_0__Name CONTENT={{!COL14}}
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__PriceRateId CONTENT=$*{{!COL15}}*
TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:save

but it then just skips over the next 3 fields before saving successfully. Any suggestions would be appreciated. :D
chivracq
Posts: 8424
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help selecting from a drop down list

Post by chivracq » Fri Aug 12, 2016 11:56 am

Hallmaster wrote:Hi Chivracq

Firstly apologies for any incorrect protocol - I'm new to this!!! :oops:

I have read through this thread and think is a similar problem to what I am experiencing so would very much appreciate any help or guidance.

I have a form for creating Customers on our website and have managed to link the form to a CSV file and get the entries to automatically load into all the relevant fields but am getting stuck when it comes to the drop menu. The macro highlights the last fields but isn't selecting them or matching them up from the CSV file. In the code this is line 26.

If done manually, you have to select the Hall field before the other options appear in the other two drop menus, if that helps!! In case it needs a number instead of a name, the number of the Hall is 1697 (Account Id 1259)

Are you able to help with this one please? Attached is the spreadsheet with samples, the code for the imacro and the code for the page with the form. The site url does need a username and password to log in if you are unable to see where I'm going wrong from the info supplied.

VERY Much appreciated in advance - Bernard
Hallmaster wrote:Hi- I've managed to get the macro to select the Hall now by changing the code to use

Code: Select all

TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:btnACT
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Hall_0__HallTypeId CONTENT=%1458
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__ActivityTypeId CONTENT=$*{{!COL13}}*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Activity_0__Name CONTENT={{!COL14}}
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__PriceRateId CONTENT=$*{{!COL15}}*
TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:save
but it then just skips over the next 3 fields before saving successfully. Any suggestions would be appreciated. :D
"Firstly apologies for any incorrect protocol - I'm new to this!!! :oops: "
=> Well then, same first Reaction like for the Original Poster: CIM...! :mrgreen:
Sorry but I usually don't read and certainly don't react when FCI is not mentioned and you should know as I mentioned it in my first Reply in this Thread...

You've put some effort in your (first) Post with the Attachment, but from the name it contains 3 Screenshots, and pfff..., it's a bit of a hassle to have to download your ZIP File, have to extract it locally before being able to see those Screenshots while Screenshots can be embedded directly in your Post, and hum..., Screenshots are nice and can help indeed a little bit to understand the Pb but we need to be able to play with the Page ourselves to see its HTML Structure (by including the URL or an HTML Saveas in a ZIP if it's behind Login&Password).

The Forum is "panicly" very busy at this moment because of the Release of the latest Version of iMacros for FF (v9.0.3) which turns out to be very buggy and to break many previously working Scripts so you need to facilitate our Task by providing directly and proactively all possibly needed Info if you want me or any other Advanced Users to want to put some time into digging into your Case... :idea:
- (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...
Hallmaster
Posts: 3
Joined: Thu Aug 11, 2016 10:10 am

Re: Help selecting from a drop down list

Post by Hallmaster » Fri Aug 12, 2016 12:44 pm

Many thanks for the reply and fully understand what you say - That all makes sense :)

Here goes with a second attempt!!

I have a form for creating Customers on our website and have managed to link the form to a CSV file and get the entries to automatically load into all the relevant fields but am getting stuck when it comes to the drop menu at the bottom of the page. The macro enters the correct Hall by using the ID of the Hall which I have entered manually into the code (Line 26) but either ignores or puts in the incorrect data from the linked CSV for the other two drop menus.

If done manually, you have to select the Hall field before the other options appear in the other two drop menus, if that helps!!

CODE FOR CREATE CUSTOMER PAGE

Code: Select all

           <hr />

            <div class="row">
                <div class="widget-box">
                    <div class="widget-header widget-header-blue widget-header-flat">
                        <h5 class="widget-title bigger lighter">Customer Activities & Rates</h5>
                    </div>
                    <div class="widget-body">
                        <div class="widget-main">
                            <div class="form-horizontal">

                                <button id="btnACT" class="btn btn-success" data-bind="click: $root.actions.activity.add" style="margin-top: 20px">Add Activity</button>
                                <a id="btnref" class="btn btn-primary btn-round" data-bind="click: $root.actions.events.ShowADD" style="margin-top: 20px;"><i class="fa fa-refresh "></i></a>
                                <div style="margin-top: 20px" data-bind="foreach: activities">
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Hall</label>
                                        <div class="col-md-8">
                                            <select class="form-control" data-bind="event:{change : $root.actions.events.FILLForm($index()) }, attr: { id: 'Hall_' + $index() + '__HallTypeId', name: 'Halls[' + $index() + '].HallTypeId' }, options: $root.formValues.hallTypeOptions, optionsText: 'Name', optionsValue: 'ID',value: hallvall"></select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Activity Group</label>
                                        <div class="col-md-8">
                                            <select  class="form-control" data-bind="attr: { id: 'Activity_' + $index() + '__ActivityTypeId', name: 'Activities[' + $index() + '].ActivityTypeId' }"></select>
                                            

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Activity Name</label>
                                        <div class="col-md-8">
                                            <input class="form-control" placeholder="eg. Yoga Class" data-bind="attr: { id: 'Activity_' + $index() + '__Name', name: 'Activities[' + $index() + '].Name' }, textInput: activityname" />
                                            <span class="text-danger" data-bind="visible: activityNameError" style="display: none">
                                                You must enter an activity name
                                            </span>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2">Rate</label>
                                        <div class="col-md-8">
                                            <select class="form-control" data-bind="attr: { id: 'Activity_' + $index() + '__PriceRateId', name: 'Activities[' + $index() + '].PriceRateId' }"></select>
                                            

                                        </div>
                                        <div class="col-md-2">
                                            <button class="btn btn-danger" data-bind="click: $root.actions.activity.remove">Remove</button>
                                        </div>
                                    </div>

                                    <hr />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <hr />
iMACRO CODE

Code: Select all

VERSION BUILD=706220518       
'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database
'TAB T=1    
'TAB CLOSEALLOTHERS  
URL GOTO=http://v2staging.hallmaster.co.uk/Admin/Customers/Create  
' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file
'CSV = Comma Separated Values in each line of the file
SET !DATASOURCE C:\Users\Cotness\Desktop\tester.csv
'Start at line 2 to skip the header in the file
SET !LOOP 2
'Increase the current position in the file with each loop 
SET !DATASOURCE_LINE {{!LOOP}}
' Fill web form   
URL GOTO=http://v2staging.hallmaster.co.uk/Admin/Customers/Create        
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:FirstName CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Surname CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Email CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:GroupName CONTENT={{!COL5}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_Address1 CONTENT={{!COL6}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_Address2 CONTENT={{!COL7}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_City CONTENT={{!COL8}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_County CONTENT={{!COL9}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_Postcode CONTENT={{!COL10}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Address_Telephone CONTENT={{!COL11}}
TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:btnACT
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Hall_0__HallTypeId CONTENT=%1697
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__ActivityTypeId CONTENT=$*{{!COL13}}*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:customerForm ATTR=ID:Activity_0__Name CONTENT={{!COL14}}
TAG POS=1 TYPE=SELECT FORM=ID:customerForm ATTR=ID:Activity_0__PriceRateId CONTENT=$*{{!COL15}}*
TAG POS=1 TYPE=BUTTON FORM=ID:customerForm ATTR=ID:save
CSV SAMPLE ENTRIES

Code: Select all

HallId	FirstName	Surname	email	Group Name	Address_Address1	Address_Address2	Address_City	Address_County	Address_Postcode	Address_Telephone	HallId	Activity Group	Activity Name	Hire Charge Rate
1A Hall	Ashleigh	Baecker	88@hammick.co.uk		13 balvaird terrace		Wimborne	Dorset	BH16 6JL	1234567	1697	Classes	Community Events	Standard Rate - Fixed
1A Hall	Fred	Smith	888@hammick.co.uk		20 Street Way		Dorchester	Dorset	DT1 8JO	987987978	1697	Meetings		Regular User Rate - Hourly
1A Hall	Jane	Ayre	8888@hammick.co.uk		3 Duck Street		Wool	Dorset	BH20 7YH	54672566	1697	Parties		 Hall Licences - Hourly
I hope that's easier to understand and use!? :mrgreen: and thanks again!!
ag5264
Posts: 7
Joined: Sat Jul 16, 2016 10:03 am

Re: Help selecting from a drop down list

Post by ag5264 » Thu May 16, 2019 2:54 am

If this is of any use to anyone, the solution was to use the EVENT command and the CLICK SELECTOR with the element ID, here is the code we used to get around this:

Code: Select all

EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
So, providing you can determine the ID, you can set the command to click it and the BUTTON value as 0 to overcome this.
chivracq
Posts: 8424
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help selecting from a drop down list

Post by chivracq » Thu May 16, 2019 3:23 am

ag5264 wrote:
Thu May 16, 2019 2:54 am
If this is of any use to anyone, the solution was to use the EVENT command and the CLICK SELECTOR with the element ID, here is the code we used to get around this:

Code: Select all

EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_0_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_1_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_2_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_3_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_text_openinghours_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_text_openinghours_und_chosen>DIV>UL>LI:nth-of-type(2)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_opening_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_opening_time_und_chosen>DIV>UL>LI:nth-of-type(6)" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_closing_time_und_chosen>A>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#edit_profile_profile_supplier_field_openinghours_und_4_field_closing_time_und_chosen>DIV>UL>LI:nth-of-type(42)" BUTTON=0
So, providing you can determine the ID, you can set the command to click it and the BUTTON value as 0 to overcome this.
Alright..., Thanks for sharing, hum..., 3 years later, ah-ah...! :twisted:

FCI still not mentioned, but that means you were then using iMacros for FF if you managed to find a Solution using the 'EVENT' Mode as this Mode then was only implemented in iMacros for FF.

Hum, OK, I still think "it" should have worked using the 'TAG' Mode and that it was probably a mini-Timing Issue, comforted by the fact that you got it to work with the 'EVENT' Mode as this Mode is "slower" than the 'TAG' Mode, and like I had already mentioned 3 years ago, often works more reliably with DDLB's...
- (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...
Post Reply