iMarcos version (x64) 11.5.499.3066
intenet explorer 11.0.9600.18738
Windows 7 Professional - Service Pack 1
Hello everyone... I'm new to iMacros but have been making good progress the last couple of days since starting to use it.
It's been my first experience of testing using automation : I've managed to fill ordinary fields, select from dropdown, plus reading values from .csv
So, quite a lot of progress
I'm having problems with autocomplete fields. That's in where instead of being a dropdown, you start typing and it brings up suggestions and then you click one.
(One for example is an occupation field, of which there are about 1500 values stored. Another is field for motoring convictions)
When recording and playing back it's not populating properly.
So, when I recorded I typed in "Consultant" and then selected "Business Consultant" from the dropdown list
The code as it appears in iMacros Editor reads
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:occupationSearch CONTENT=BUSINESS<SP>CONSULTANT
TAG POS=1 TYPE=LI ATTR=ID:ui-id-2
When I try to play back I receive the error
Error -1300: Cannot find HTML element of type "LI:" with attribute(s) "ID:ui-id-2".. Line 38: TAG POS=1 TYPE=LI ATTR=ID:ui-id-2
If I try to remove that line, then the completed form reads "Business Consultant" but it hasn't been selected from the list, so, when the playback tries to hit "next" it believes a value has not been selected.
Are there any suggestions on how I can automate this part of the process? Any advice appreciate.
Automating Autocomplete Forms
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
Re: Automating Autocomplete Forms
Try using the 'EVENT' Mode which is usually able to better handle those dynamically populated DDLB's than the 'TAG' Mode...kev36663 wrote:Hello everyone... I'm new to iMacros but have been making good progress the last couple of days since starting to use it.Code: Select all
iMarcos version (x64) 11.5.499.3066 intenet explorer 11.0.9600.18738 Windows 7 Professional - Service Pack 1
It's been my first experience of testing using automation : I've managed to fill ordinary fields, select from dropdown, plus reading values from .csv
So, quite a lot of progress
I'm having problems with autocomplete fields. That's in where instead of being a dropdown, you start typing and it brings up suggestions and then you click one.
(One for example is an occupation field, of which there are about 1500 values stored. Another is field for motoring convictions)
When recording and playing back it's not populating properly.
So, when I recorded I typed in "Consultant" and then selected "Business Consultant" from the dropdown list
The code as it appears in iMacros Editor reads
When I try to play back I receive the errorCode: Select all
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:occupationSearch CONTENT=BUSINESS<SP>CONSULTANT TAG POS=1 TYPE=LI ATTR=ID:ui-id-2
If I try to remove that line, then the completed form reads "Business Consultant" but it hasn't been selected from the list, so, when the playback tries to hit "next" it believes a value has not been selected.Code: Select all
Error -1300: Cannot find HTML element of type "LI:" with attribute(s) "ID:ui-id-2".. Line 38: TAG POS=1 TYPE=LI ATTR=ID:ui-id-2
Are there any suggestions on how I can automate this part of the process? Any advice appreciate.
And a mini-'WAIT' between the 2 Statements might help as well...
And make sure your '!TIMEOUT_STEP' is long enough (>=2) to allow the DDLB to retrieve its Content...
I can have a look if you can post the URL, if you don't come out by yourself...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Automating Autocomplete Forms
Thanks,
I've tried again when recording as event
It does retrieve the drop down list, but won't select
Returns error of Error -1300: Cannot find HTML element using specified Selector expression: #ui-id-15. Line 28: EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
The code reads as :
EVENT TYPE=CLICK SELECTOR="#occupationSearch" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#occupationSearch" CHARS="accou"
wait seconds = 2
EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
I'm using a test platform
But the live website works in the same way : https://www.motorinsurance.collingwood.co.uk/
Basically getting a quote, it's on the second page of the application (although a similar one on the third page)
Using the 'event' recording, on playback it won't click the button next to the car registration (page 1) or post code (page 2) - these work on the 'TAG' setting - is it possible to mix and match?!
I've tried again when recording as event
It does retrieve the drop down list, but won't select
Returns error of Error -1300: Cannot find HTML element using specified Selector expression: #ui-id-15. Line 28: EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
The code reads as :
EVENT TYPE=CLICK SELECTOR="#occupationSearch" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#occupationSearch" CHARS="accou"
wait seconds = 2
EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
I'm using a test platform
But the live website works in the same way : https://www.motorinsurance.collingwood.co.uk/
Basically getting a quote, it's on the second page of the application (although a similar one on the third page)
Using the 'event' recording, on playback it won't click the button next to the car registration (page 1) or post code (page 2) - these work on the 'TAG' setting - is it possible to mix and match?!
Re: Automating Autocomplete Forms
Ah OK, I didn't want to mention it in my first Reply because "ui-id-2" looked "legit" but the ID is dynamic as you can see it now becomes "ui-id-15", and even "ui-id-70" for me when I check the Page.kev36663 wrote:Thanks,
I've tried again when recording as event
It does retrieve the drop down list, but won't select
Returns error ofThe code reads as :Code: Select all
Error -1300: Cannot find HTML element using specified Selector expression: #ui-id-15. Line 28: EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
Code: Select all
EVENT TYPE=CLICK SELECTOR="#occupationSearch" BUTTON=0 EVENTS TYPE=KEYPRESS SELECTOR="#occupationSearch" CHARS="accou" wait seconds = 2 EVENT TYPE=CLICK SELECTOR="#ui-id-15" BUTTON=0
I'm using a test platform
But the live website works in the same way : https://www.motorinsurance.collingwood.co.uk/
Basically getting a quote, it's on the second page of the application (although a similar one on the third page)
Using the 'event' recording, on playback it won't click the button next to the car registration (page 1) or post code (page 2) - these work on the 'TAG' setting - is it possible to mix and match?!
Was a bit of a hassle to reach Page_2 about "Policyholder Details" as Page_1 needed some valid UK Registration Number + a valid Postcode, but OK, I managed...:
+ Registration Nb: "EBZ 5155"
+ Postcode: "BR1 1AA"
You then need to replace the changing part in the ID with a Wildcard like for example if you want to select "Accountant":
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://www.motorinsurance.collingwood.co.uk/Customer/Index
TAG POS=1 TYPE=LABEL FORM=ACTION:/Customer/Save ATTR=TXT:Occupation
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Customer/Save ATTR=ID:occupationSearch CONTENT=accou
'Select "Accountant":
'TAG POS=1 TYPE=LI ATTR=ID:ui-id-70 // (Recorded)
TAG POS=R2 TYPE=LI ATTR=ID:ui-id-*
Code: Select all
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Customer/Save ATTR=ID:occupationSearch CONTENT=ACCOUNTANT
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://www.motorinsurance.collingwood.co.uk/Customer/Index
'EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>FORM>DIV>DIV>DIV:nth-of-type(8)>LABEL" BUTTON=0
'EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>FORM>DIV>DIV>DIV:nth-of-type(8)>DIV>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>FORM>DIV>DIV>DIV:nth-of-type(8)>DIV>INPUT" CHARS="accou"
'Select "Accountant":
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>FORM>DIV>DIV>DIV:nth-of-type(8)>DIV>UL>LI:nth-of-type(2)" BUTTON=0
And yep, you can mix all Modes together in the same Script.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...