EVAL Method Get Error

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
Tamilselvan
Posts: 101
Joined: Mon Mar 07, 2016 10:49 am

EVAL Method Get Error

Post by Tamilselvan » Mon Oct 12, 2020 7:00 am

Firefox 52.9.0 (32-bit)
iMacros 8.9.7
Win-10 (64-bit)

Hi,
I try to select option button if does not exist, skip to select and click submit button.
I tried following code. its selected one option button only & shows error.
Error.jpg
Kindly guide me...

Thanks & Regards,
S.Tamilselvan.

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1

'URL GOTO=https://mnregaweb5.nic.in/netnrega/FTO/Ftoverify.aspx
TAG POS={{!LOOP}} TYPE=INPUT:RADIO FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_wage_list_verify_ctl*_auth
TAG POS={{!LOOP}} TYPE=INPUT:RADIO FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_wage_list_verify_ctl*_auth EXTRACT=TXT
'Submit Button
SET !VAR3 EVAL("var z; if('{{!EXTRACT}}'!='{{#EANF#}}'){z=0;} else{z=1;}; z;")
TAG POS={{!VAR3}} TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_ch_verified

'Authorised
'ONDIALOG POS=1 BUTTON=OK CONTENT=
'TAG POS={{!VAR3}} TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btn
chivracq
Posts: 9681
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: EVAL Method Get Error

Post by chivracq » Fri Nov 06, 2020 8:33 am

Tamilselvan wrote:
Mon Oct 12, 2020 7:00 am

Code: Select all

Firefox 52.9.0 (32-bit)
iMacros 8.9.7
Win-10 (64-bit)
Hi,
I try to select option button if does not exist, skip to select and click submit button.
I tried following code. its selected one option button only & shows error.
Error.jpg
Kindly guide me...

Thanks & Regards,
S.Tamilselvan.

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1

'URL GOTO=https://mnregaweb5.nic.in/netnrega/FTO/Ftoverify.aspx
TAG POS={{!LOOP}} TYPE=INPUT:RADIO FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_wage_list_verify_ctl*_auth
TAG POS={{!LOOP}} TYPE=INPUT:RADIO FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_wage_list_verify_ctl*_auth EXTRACT=TXT
'Submit Button
SET !VAR3 EVAL("var z; if('{{!EXTRACT}}'!='{{#EANF#}}'){z=0;} else{z=1;}; z;")
TAG POS={{!VAR3}} TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_ch_verified

'Authorised
'ONDIALOG POS=1 BUTTON=OK CONTENT=
'TAG POS={{!VAR3}} TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btn
Oh...!?, nice to see that you "finally" followed my Advice and came back to v8.9.7 for FF, after using v9.0.3 for quite some time... :D

But hum, getting tired of asking you for nearly all your Threads to open them in the "correct" Sub-Forum... :roll:
=> I let you ask yourself the Forum Admin to move this Thread to the "correct" Sub-Forum (= 'General' one), it has nothing specific to the 'iMacros for FF' Sub-Forum... (... by using the 'Report' Button on your OP or my Post, the "Procedure" is explained in the Forum Rules...), before I will answer it... :idea:

And that applies also to your previous Thread... (to which I didn't even react as it was (again...) opened in the "wrong" Sub-Forum...). :roll:
And for both, post a mini-Update/Bump once they'll have been moved, unless I notice it myself "before you", of course... :wink:

The Thread about the 'EVENT' Mode was quite interesting actually, you "should"/could have bumped it already earlier, or posted the Solution if you managed to find it/one by yourself... (But don't delete it, or I don't help anymore...)
(And the Solution for this current Thread is pretty "trivial", if you read the Runtime Error... :idea: )

>>>

Hum, and for this Thread, your Screenshot is "perfect" to understand the Logic/Scenario of your Script in combination with the Runtime Error :D , but... => could you also post/include the Runtime Error in "Plain Text" in your OP or in some next Reply...?, as Screenshots/'.jpg' Images are not searchable by the Search Engine, to make this Thread also "useful" for other Users searching the Forum on the same Runtime Error... :idea:
- (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...
chivracq
Posts: 9681
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: EVAL Method Get Error

Post by chivracq » Wed Nov 11, 2020 7:10 pm

Oh...!, I wanted to have a "quick Look" at this one, now that it has "finally" gotten moved to the "correct" Sub-Forum..., good...! :D

But hum, I had asked you to also post the Runtime Error in plain Text in your OP/Thread, but you didn't comply, then sorry, I don't help if you don't react to or ignore my Suggs/Qt's/Requests... :roll:

The "Solution" to this one is "trivial" btw..., if you simply made "the Effort" to read the Runtime Error, ah-ah...! :idea:
- (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: 101
Joined: Mon Mar 07, 2016 10:49 am

Re: EVAL Method Get Error

Post by Tamilselvan » Thu Nov 12, 2020 11:48 pm

Thanks a lot to Forum Admin

Here its Run Time Errors message.
Bad Parameter expected POS=<number> or POS=R<number> where <number> is a non-zero integer as parameter 1 line 10 (Error Code -911)
I think if #EANF is not found then (z=1) loop & selecting the option button will continue else (z=0) skip the looping process and finally click the submit button. POS number has changed as depend on conditions. I am not tested right now. is it right?

Code: Select all

SET !VAR3 EVAL("var z; if('{{!EXTRACT}}'!='{{#EANF#}}'){z=1;} else{z=0;}; z;")
chivracq
Posts: 9681
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: EVAL Method Get Error

Post by chivracq » Fri Nov 13, 2020 12:26 am

Tamilselvan wrote:
Thu Nov 12, 2020 11:48 pm
Thanks a lot to Forum Admin

Here its Run Time Errors message.
Bad Parameter expected POS=<number> or POS=R<number> where <number> is a non-zero integer as parameter 1 line 10 (Error Code -911)
I think if #EANF is not found then (z=1) loop & selecting the option button will continue else (z=0) skip the looping process and finally click the submit button. POS number has changed as depend on conditions. I am not tested right now. is it right?

Code: Select all

SET !VAR3 EVAL("var z; if('{{!EXTRACT}}'!='{{#EANF#}}'){z=1;} else{z=0;}; z;")

Yeah, well, it's even more "simple" than that, the Runtime Error is about "POS" and about your Line_10, not about your Line_9 which is the one about the 'EVAL()'...

From your Script, here are Lines 9 + 10:

Code: Select all

SET !VAR3 EVAL("var z; if('{{!EXTRACT}}'!='{{#EANF#}}'){z=0;} else{z=1;}; z;")
TAG POS={{!VAR3}} TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_ch_verified
And yep, '!VAR3' returns "1" or "0" to reuse as "POS=1" or "POS=0", and the Runtime Error is complaining about "POS=0".

Then yep, of course, "we know that"...!, that's exactly the "Purpose" of 'POS=0', => to conditionally trigger a Line/Statement that won't do anything...
If you don't "like" "POS=0", you can use "POS=9999" instead if you prefer... It's the same Principle...
And for 'POS=9999', you will get some some "very surprising and totally unexpected" (that's Humour...!) Runtime Error saying that the whatever Element at 'POS=9999' does not exist... :P

=> Simply solved with '!ERRORIGNORE'... = The trivial Solution I meant...! :idea:
- (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