Failing to select city name from menu appears when typing

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
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
Post Reply
afadlalla
Posts: 2
Joined: Mon May 21, 2018 9:33 pm

Failing to select city name from menu appears when typing

Post by afadlalla » Mon May 21, 2018 9:48 pm

I am new to Imacros and programming. I used the automatic settings to record the steps to fill my ads. Macro stops at line 21 failing to select the city (any city name) from the menu that appears when you start typing the first letters of the city name. Imacros stops and shows the following error message:

"Error -1300: Cannot find HTML element of type "STRONG:" with attribute(s) "TXT:Manama".. Line 21: TAG POS=1 TYPE=STRONG ATTR=TXT:Manama"

- Imacros VERSION: BUILD=12.0.501.6698
- OS: Windows 10 Home English
- Browser: IE 11
- demo macros work ok
- Website: https://olx.com.bh/en
- The Macro (with dummy but active user and P/W and other info):

VERSION BUILD=12.0.501.6698
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
URL GOTO=https://olx.com.bh/en/
TAG POS=1 TYPE=STRONG ATTR=TXT:My<SP>account
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:login[email] CONTENT=bf8ac095@emailna.co
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:login[password] CONTENT=12345678
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:se_userLogin
TAG POS=1 TYPE=SPAN ATTR=TXT:Place<SP>a<SP>Free<SP>Ad
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[title] CONTENT=office<SP>space
TAG POS=1 TYPE=A ATTR=ID:choose-category-ilu
TAG POS=2 TYPE=A ATTR=TXT:Properties
TAG POS=1 TYPE=SPAN ATTR=TXT:Properties<SP>for<SP>Rent
TAG POS=1 TYPE=A ATTR=TXT:Commercial<SP>for<SP>Rent
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_price][1] CONTENT=80
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_area] CONTENT=10
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:data[description] CONTENT= office<SP>for<SP>rent
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[city] CONTENT=manama
TAG POS=1 TYPE=STRONG ATTR=TXT:Manama
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[person] CONTENT=Mr.X
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[phone] CONTENT=34567890
TAG POS=1 TYPE=LABEL ATTR=CLASS:icon<SP>f_radio<SP>inlblk<SP>vtop
TAG POS=2 TYPE=INPUT:RADIO ATTR=NAME:data[contactform]
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:save
Attachments
Image of the Macro used
Image of the Macro used
Image of Error Message
Image of Error Message
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Failing to select city name from menu appears when typin

Post by chivracq » Mon May 21, 2018 10:41 pm

afadlalla wrote:I am new to Imacros and programming. I used the automatic settings to record the steps to fill my ads. Macro stops at line 21 failing to select the city (any city name) from the menu that appears when you start typing the first letters of the city name. Imacros stops and shows the following error message:

Code: Select all

    "Error -1300: Cannot find HTML element of type "STRONG:" with attribute(s) "TXT:Manama".. Line 21: TAG POS=1 TYPE=STRONG ATTR=TXT:Manama"

Code: Select all

-	Imacros VERSION: BUILD=12.0.501.6698
-	OS: Windows 10 Home English
-	Browser: IE 11 
- demo macros work ok
- Website: https://olx.com.bh/en
- The Macro (with dummy but active user and P/W and other info):

Code: Select all

VERSION BUILD=12.0.501.6698
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
URL GOTO=https://olx.com.bh/en/
TAG POS=1 TYPE=STRONG ATTR=TXT:My<SP>account
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:login[email] CONTENT=bf8ac095@emailna.co
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:login[password] CONTENT=12345678
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:se_userLogin
TAG POS=1 TYPE=SPAN ATTR=TXT:Place<SP>a<SP>Free<SP>Ad
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[title] CONTENT=office<SP>space
TAG POS=1 TYPE=A ATTR=ID:choose-category-ilu
TAG POS=2 TYPE=A ATTR=TXT:Properties
TAG POS=1 TYPE=SPAN ATTR=TXT:Properties<SP>for<SP>Rent
TAG POS=1 TYPE=A ATTR=TXT:Commercial<SP>for<SP>Rent
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_price][1] CONTENT=80
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_area] CONTENT=10
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:data[description] CONTENT= office<SP>for<SP>rent
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[city] CONTENT=manama
TAG POS=1 TYPE=STRONG ATTR=TXT:Manama
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[person] CONTENT=Mr.X
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[phone] CONTENT=34567890
TAG POS=1 TYPE=LABEL ATTR=CLASS:icon<SP>f_radio<SP>inlblk<SP>vtop
TAG POS=2 TYPE=INPUT:RADIO ATTR=NAME:data[contactform]
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:save
Oh...!, excellent...! :!: :D :!:
Compliments on the Quality of your Post, with FCI mentioned + Script and even Test Account, woaw-woaw...!, you restore a little bit my "Hope" in "Humanity" (well, I mean "New Users on the Forum", ah-ah...!), after a "Wave" of "stupidly Low Quality" Threads yesterday... :shock:

OK, meaning I was able to have a look at your Site and it appears that you can simply comment out that Line_21 about the 'STRONG' Element when selecting the "Manama" City from the DDLB once you start typing the City Name... :D

When you replay the Macro, if the previous Line already filled a (complete) "valid" City, the Site then doesn't need the 2nd Line, and you can simply comment it out, or you could use '!ERRORIGNORE' to keep your Script working beyond that Line... (+ shorten maybe '!TIMEOUT_STEP' or your Macro will still pause for 6 sec on the 'STRONG' Element that it obviously doesn't find).

=> The following a bit updated/tuned Version of your Macro should then work...:

Code: Select all

VERSION BUILD=12.0.501.6698
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 1
TAB T=1
'TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
'>
URL GOTO=https://olx.com.bh/en/
'>
TAG POS=1 TYPE=STRONG ATTR=TXT:My<SP>account
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:login[email] CONTENT=bf8ac095@emailna.co
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:login[password] CONTENT=12345678
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:se_userLogin
'>
TAG POS=1 TYPE=SPAN ATTR=TXT:Place<SP>a<SP>Free<SP>Ad
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[title] CONTENT=office<SP>space
TAG POS=1 TYPE=A ATTR=ID:choose-category-ilu
TAG POS=2 TYPE=A ATTR=TXT:Properties
TAG POS=1 TYPE=SPAN ATTR=TXT:Properties<SP>for<SP>Rent
TAG POS=1 TYPE=A ATTR=TXT:Commercial<SP>for<SP>Rent
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_price][1] CONTENT=80
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[param_area] CONTENT=10
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:data[description] CONTENT= office<SP>for<SP>rent
'City:
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[city] CONTENT=manama
TAG POS=1 TYPE=STRONG ATTR=TXT:Manama
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[person] CONTENT=Mr.X
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:data[phone] CONTENT=34567890
TAG POS=1 TYPE=LABEL ATTR=CLASS:icon<SP>f_radio<SP>inlblk<SP>vtop
TAG POS=2 TYPE=INPUT:RADIO ATTR=NAME:data[contactform]
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:save
(Tested on iMacros for FF v8.8.2, Pale Moon v24.6.6 (=FF47), Win10_x64.)

As you can see, I "prefer" the '!ERRORIGNORE' + '!TIMEOUT_STEP' "Solution" which I think is probably more "reliable", because commenting out the 'STRONG' Line for "Manama" would work in this current specific Case as the previous Line contained already the full "manama" City Name, but the 'STRONG' Line would probably still be needed if your Script had only typed "manam" on the previous Line...

And the Dot in "Mr.X" is not accepted by the Site btw on the 'INPUT' + 'data[person]' Line afterwards..., but OK, that's a different mini-Pb, related to your Test Data, ah-ah...! :wink:

If the current Solution doesn't work "all the time" for different City Names, think of giving a try to the 'EVENT' Mode for typing/selecting the City Name... :idea:
The 'EVENT' Mode usually works pretty well with such Dynamic DDLB's where you start typing an Entry, and the corresponding Option(s) get(s) dynamically retrieved.
- (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...
afadlalla
Posts: 2
Joined: Mon May 21, 2018 9:33 pm

Re: Failing to select city name from menu appears when typin

Post by afadlalla » Tue May 22, 2018 7:29 pm

Thank you so much for the prompt reply Chivracq, and the praise on the post (I read the instruction manual always :lol: ).
You are right the proposed solution fixed the script and it runs past line 21 till the end, but it did not solve the root problem which is failure to post the ad. Since the web page did not accept the city entry which is a mandatory field, the post will not be posted and the last line (TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:save) will not be accepted (though it will be run by the macro). Accordingly, no ad will be posted and the error message will be shown on the web page as shown in the attachment.

The problem as you have correctly stated is due to the "Dynamic DDLB'" you talked about. Actually I have been working on this problem for the past two weeks before landing on this forum, and I have tried all the recording options in Imacros: complete HTML, selector, direct screen (very annoying), and events without success.

I hope to get some help here, before loosing hope on "humanity" :D .
Thank you in advance for the help.
Attachments
Error 2.JPG
Post Reply