Search & Select List Item

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
Tamilselvan
Posts: 80
Joined: Mon Mar 07, 2016 10:49 am

Search & Select List Item

Post by Tamilselvan » Sun Aug 25, 2019 9:38 am

Firefox for Windows Ver 49.0.1 (32 bit)
iMacros for FF Ver 8.9.7
OS Windows 10

Dear Sir,
While I Searching a text in list box, Item is listed; but when cursor is released from text box the list of item is not selected then error is shown.
Kindly help me.

RuntimeError: element TD specified by TXT:State<SP>fund was not found, line 26 (Error code: -921)

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_txtscheme CONTENT=state<SP>fund
TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund
Thanks & Regards,
S.Tamilselvan
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Search & Select List Item

Post by chivracq » Sun Aug 25, 2019 1:45 pm

Tamilselvan wrote:
Sun Aug 25, 2019 9:38 am

Code: Select all

Firefox for Windows Ver 49.0.1 (32 bit)
iMacros for FF Ver 8.9.7
OS Windows 10
Dear Sir,
While I Searching a text in list box, Item is listed; but when cursor is released from text box the list of item is not selected then error is shown.
Kindly help me.

RuntimeError: element TD specified by TXT:State<SP>fund was not found, line 26 (Error code: -921)

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_txtscheme CONTENT=state<SP>fund
TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund
Thanks & Regards,
S.Tamilselvan

What is the Value of '!TIMEOUT_STEP' in your Script "at that moment"...?
=> It needs to be at least =1, or higher for the 'TD' Element in the DDLB to be "seen"/found...

But hum, as it is a 'TD' Element, it's probably one of those dynamically constructed and populated DDLB's from a previous Selection, or from a "start typing" in some Input Field and the List of corresponding Elements in the DDLB gets dynamically retrieved and narrowed to 1-2-3 Element(s) with eventually only your desired Element listed at some point, as the first and only Item left thus...
Oh...!, yep indeed, confirmed by your "Search & Select" in your Thread Title..., and yep that Type of DDLB's often has "Difficulties" using the 'TAG' Mode...
=> The 'EVENT' Mode works usually best with such dynamic DDLB's, with or without ID's, you'll have to try both, "without ID's" might work better...

What also often works well, is to do the "final" Selection in the DDLB, by using the Keyboard 'Down' Arrow to select that first and only Item, still using the 'EVENT' Mode of course...
And for all 3 Cases, I would add a mini-'WAIT' Statement (of 0.3 or 0.5 Sec) to allow for time for the DDLB to get populated and the List narrowed to your Input Criteria.

And I would also fill in the 'INPUT' Field with the 'EVENT' Mode, as the 'EVENT' Mode is slower (than the 'TAG' Mode), and your "State fund" Input will be "typed" one Char by one Char at the time, like a "human" User would do...

>>>

Your Thread btw has nothing specific to the 'iMacros for FF' Sub-Forum, try to select the "correct" Sub-Forum when you open a New Thread, and I think I've already told you that... :!:
(=> Would have been the 'General' one in this Case... But no need to duplicate now...)
(And the 'General' Sub-Forum is always "correct" if you are "unsure" which Sub-Forum to open your Thread in...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tamilselvan
Posts: 80
Joined: Mon Mar 07, 2016 10:49 am

Re: Search & Select List Item

Post by Tamilselvan » Tue Aug 27, 2019 12:16 pm

Thank You...

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 2
SET !DATASOURCE Pond.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddblock CONTENT=${{!COL1}}
WAIT SECONDS=2
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddPanchayat CONTENT=${{!COL2}}
WAIT SECONDS=2
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddVillage CONTENT=${{!COL3}}
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_btnAddnew

WAIT SECONDS=4

TAG POS=1 TYPE=SELECT ATTR=NAME:ctl00$CPHPage$ddministry CONTENT=%5
WAIT SECONDS=6
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtscheme CONTENT=State<SP>fund<SP>
WAIT SECONDS=4
'TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddl_Objective CONTENT=%6
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtlocation CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtexp CONTENT=2000

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_txtcompdate CONTENT=23/08/2019
wait seconds=2
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$CPHPage$btnsave
WAIT SECONDS=2

SET !EXTRACT NULL
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_CPHPage_lblpopmsg EXTRACT=TXT

SET Data_Success {{!EXTRACT}}

SET !EXTRACT {{Data_Success}}
SET !EXTRACT {{!COL1}}[EXTRACT]{{!COL2}}[EXTRACT]{{!COL3}}[EXTRACT]{{!COL4}}[EXTRACT]{{Data_Success}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Success.csv

WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_btncancle
wait seconds=3
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$CPHPage$btncancle
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Search & Select List Item

Post by chivracq » Tue Aug 27, 2019 2:31 pm

Tamilselvan wrote:
Tue Aug 27, 2019 12:16 pm
Thank You...

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 2
SET !DATASOURCE Pond.csv
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddblock CONTENT=${{!COL1}}
WAIT SECONDS=2
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddPanchayat CONTENT=${{!COL2}}
WAIT SECONDS=2
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddVillage CONTENT=${{!COL3}}
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_btnAddnew

WAIT SECONDS=4

TAG POS=1 TYPE=SELECT ATTR=NAME:ctl00$CPHPage$ddministry CONTENT=%5
WAIT SECONDS=6
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtscheme CONTENT=State<SP>fund<SP>
WAIT SECONDS=4
'TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddl_Objective CONTENT=%6
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtlocation CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtexp CONTENT=2000

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_txtcompdate CONTENT=23/08/2019
wait seconds=2
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$CPHPage$btnsave
WAIT SECONDS=2

SET !EXTRACT NULL
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_CPHPage_lblpopmsg EXTRACT=TXT

SET Data_Success {{!EXTRACT}}

SET !EXTRACT {{Data_Success}}
SET !EXTRACT {{!COL1}}[EXTRACT]{{!COL2}}[EXTRACT]{{!COL3}}[EXTRACT]{{!COL4}}[EXTRACT]{{Data_Success}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Success.csv

WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_btncancle
wait seconds=3
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=NAME:ctl00$CPHPage$btncancle

Hum, OK, but I'm not sure what your "Thank You" means...? :?

You don't give any Explanation and only post a Script... :?
Is this your original Script...?, or have you updated it, and you are now posting your Final (working) Script...? :?

I see many 'WAIT' Statements in it, lots of them actually, and pretty long, I would fall asleep watching your Script run, ah-ah...! :shock: , but no 'EVENT' Statement(s) like I had suggested... Or is the 'WAIT' Statement (=4 Sec) before selecting the 'State<SP>fund' Item in the DDLB already good enough to solve the Issue...?

Watch out btw for the extra Space you add at the end of your Search Input, it could be causing some "Pb"...

Relevant part of your Script... (well, for me):

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !TIMEOUT_STEP 2
'[...]

TAG POS=1 TYPE=SELECT ATTR=NAME:ctl00$CPHPage$ddministry CONTENT=%5
WAIT SECONDS=6
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtscheme CONTENT=State<SP>fund<SP>
WAIT SECONDS=4
'TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund
TAG POS=1 TYPE=SELECT FORM=ID:aspnetForm ATTR=ID:ctl00_CPHPage_ddl_Objective CONTENT=%6
WAIT SECONDS=2
'[...]
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tamilselvan
Posts: 80
Joined: Mon Mar 07, 2016 10:49 am

Re: Search & Select List Item

Post by Tamilselvan » Sat Aug 31, 2019 2:33 am

Good Morning Sir,

Due to server problem, i had used more wait statement. Its take time for each select statement.

As you told EVENT Mode is slower then TAG Mode.
( I don't know how to use )

In INPUT field while typing char and hold on cursor, the list of item shows then we manually select the items. so what i did put the words directly and skip the selecting item.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtscheme CONTENT=State<SP>fund<SP>
WAIT SECONDS=4
'TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund

And then sorry for late reply.... :(

Thank You...
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Search & Select List Item

Post by chivracq » Sat Aug 31, 2019 4:02 am

Tamilselvan wrote:
Sat Aug 31, 2019 2:33 am
Good Morning Sir,

Due to server problem, i had used more wait statement. Its take time for each select statement.

As you told EVENT Mode is slower then TAG Mode.
( I don't know how to use )

In INPUT field while typing char and hold on cursor, the list of item shows then we manually select the items. so what i did put the words directly and skip the selecting item.

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$CPHPage$txtscheme CONTENT=State<SP>fund<SP>
WAIT SECONDS=4
'TAG POS=1 TYPE=TD ATTR=TXT:State<SP>fund

And then sorry for late reply.... :(

Thank You...
As you told EVENT Mode is slower then TAG Mode.
( I don't know how to use )
=> Hum, I don't see the "Connection" between your 2 Sentences if you don't know how to use the 'EVENT' Mode...!? :?

But "I don't know how to use it" sounds a bit "useless" to me...! :shock:
=> Simply record those Steps using the 'EVENT' Mode in Recording Mode, ah-ah...! :roll:

(If you pay me a Trip to India (you live in India, I think...?), I'm willing to come and spank you in public (oh yeah...!!, you'll love it, ah-ah...! :shock: ), and to write your Script, Live if you want, and give you all Explanation(s)... :idea: )

Hum, maybe cheaper for you, you have an Advanced User from India on the Forum, well, I think they are from India also... => 'access2vivek', with a way to contact them in their Sig... :idea:
Might be easier for you to have some "local" Contact as you don't sound very "fut-fut", that User sounds/sounded pretty good to me, and they could give you a "Training" for a few hours maybe, and maybe On-Site, as you are missing a lot of the "Basics"... OK, just an Idea, but you would learn a lot, I would think...! 8)

I don't mind (too much, ah-ah...!) helping you, but hum, you've now been using iMacros for 3.5 years and you still sound a bit like a complete Beginner each time you encounter the slightest Pb with one of your Scripts... :o I don't know, but you should "progress" a bit quicker... It took me just a few hours (hum, minutes probably) 10 or 12 years ago when I first discovered iMacros, to "solve" Situations like the ones you encounter, each time you open a Thread, and to edit/adapt my Script accordingly..., simply from reading the Wiki, and trying "a few things" myself..., until "it worked"... It's not very "complicated"...
(I didn't even know/thought there was a Forum..., I only discovered the Forum several years later (=> = 5 or 6 years later) when I had one "Blocking" Bug that I really-really couldn't find a Workaround, and I just wanted to report it... (I still found a Workaround later, ah-ah...!, and that Bug has still not been fixed, re-ah-ah...!))

>>>

But OK, sorry, but I half-understood your Reply... I'm not sure if you are asking any Qt, reporting any Progress, etc...? :?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
access2vivek
Posts: 50
Joined: Wed Dec 20, 2017 10:00 am
Location: New Delhi, India
Contact:

Re: Search & Select List Item

Post by access2vivek » Wed Oct 16, 2019 7:55 am

chivracq wrote: (If you pay me a Trip to India (you live in India, I think...?), I'm willing to come and spank you in public (oh yeah...!!, you'll love it, ah-ah...! :shock: ), and to write your Script, Live if you want, and give you all Explanation(s)... :idea: )
Hahahahahaha. Willing to spank in public :lol: ! You have a great sense of Humor mate.
chivracq wrote: Hum, maybe cheaper for you, you have an Advanced User from India on the Forum, well, I think they are from India also... => 'access2vivek', with a way to contact them in their Sig... :idea:
Might be easier for you to have some "local" Contact as you don't sound very "fut-fut", that User sounds/sounded pretty good to me, and they could give you a "Training" for a few hours maybe, and maybe On-Site, as you are missing a lot of the "Basics"... OK, just an Idea, but you would learn a lot, I would think...! 8)
I am honored to be called an "Advanced user" by you. Thank you so much :o !
Side note: - Do users not get notified when their profile is mentioned because I did not seem to get notified. :?:
chivracq wrote: But OK, sorry, but I half-understood your Reply... I'm not sure if you are asking any Qt, reporting any Progress, etc...? :?
I followed the thread and I too could not understand what is asked :mrgreen:
Robust iMacros development with quick turnaround time. Drop an email at "access2content@gmail.com" with your project details.
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Search & Select List Item

Post by chivracq » Thu Oct 17, 2019 3:25 am

:wink: :D :wink:

>>>
access2vivek wrote:
Wed Oct 16, 2019 7:55 am
Side note: - Do users not get notified when their profile is mentioned because I did not seem to get notified. :?:

Nope, no Notification... I don't think that Functionality is actually supported at all in 'phpBB'...

PM is also disabled on the Forum...

But I had posted a Link to your Profile as you "luckily" have some E-mail Address mentioned in your Sig/Profile, in case @OP might have wanted to contact you directly, if they wanted to get in contact with some "local" Advanced User in their Country and speaking their Language, for some "Speed-Training" or Consultant's Job as they (still) miss a lot of the "Basics", even after using iMacros for several years...
But I guess they didn't try to contact you..., and didn't follow up anymore either in this Thread... :(
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply