sometimes the script works other time i get RuntimeError:

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
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

sometimes the script works other time i get RuntimeError:

Post by master68 » Fri Sep 28, 2018 2:13 pm

Hello,
I really appreciate your help i got stuck in something can't solve the below script works just great all of sudden i get
RuntimeError: element DIV specified by ID:verify-me was not found, line: 4
this DIV is needed to solve the coinhive captcha so basicaly the script runs very 30 mins solve the captcha and submit the form


1 REFRESH
2 URL GOTO=https://sitename here
4 TAG POS=1 TYPE=DIV ATTR=ID:verify-me
5 WAIT SECONDS=5
6 FRAME F=0
7 TAG POS=1 TYPE=BUTTON FORM=ID:claim-form ATTR=ID:claim-button
8 WAIT SECONDS=1801

as i said above it runs for few times and then stops getting
RuntimeError: element DIV specified by ID:verify-me was not found, line: 4
so i have to replay it again the issue is that i am not available near my PC to check when it stops and push it manually to replay

please help thx
Last edited by master68 on Fri Sep 28, 2018 3:42 pm, edited 1 time in total.
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: SOMETIMES THE sCRIPT WORKS OTHER TIME i get RuntimeError

Post by chivracq » Fri Sep 28, 2018 3:26 pm

master68 wrote:Hello,
I really appreciate your help i got stuck in something can't solve the below script works just great all of sudden i get
RuntimeError: element DIV specified by ID:verify-me was not found, line: 4
this DIV is needed to solve the coinhive captcha so basicaly the script runs very 30 mins solve the captcha and submit the form

Code: Select all

1	REFRESH
2	URL GOTO=https://sitename here
4	TAG POS=1 TYPE=DIV ATTR=ID:verify-me
5	WAIT SECONDS=5
6	FRAME F=0
7	TAG POS=1 TYPE=BUTTON FORM=ID:claim-form ATTR=ID:claim-button
8	WAIT SECONDS=1801
as i said above it runs for few times and then stops getting
RuntimeError: element DIV specified by ID:verify-me was not found, line: 4
so i have to replay it again the issue is that i am not available near my PC to check when it stops and push it manually to replay

please help thx
You don't need to use (nearly) CAPS only in your Thread Title...

Your Thread will be moved to the 'General' Sub-Forum as it has nothing to do with the 'Scripting Interface', try to select the correct Sub-Forum next time you open a Thread...

CIM...! :mrgreen: (Read my Sig...)

But concerning your Case, simply use '!ERRORIGNORE' I would think... :idea:
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: SOMETIMES THE sCRIPT WORKS OTHER TIME i get RuntimeError

Post by master68 » Fri Sep 28, 2018 3:32 pm

sorry i didn't realize the CAPS as you can see the s in script is small :) so it was an obvious mistake without paying attention to it
as for the category i thought it has to be in the scripting section another mistake sorry
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: SOMETIMES THE sCRIPT WORKS OTHER TIME i get RuntimeError

Post by chivracq » Fri Sep 28, 2018 3:36 pm

master68 wrote:sorry i didn't realize the CAPS as you can see the s in script is small :) so it was an obvious mistake without paying attention to it
as for the category i thought it has to be in the scripting section another mistake sorry
Don't worry about the Sub-Forum/Category, your Thread will be moved by the Forum Admin...

You can edit your Thread Title yourself to remove the unnecessary CAPS...

And you can mention/include your FCI as well like I asked you in the "CIM" part...
Last edited by chivracq on Fri Sep 28, 2018 3:49 pm, edited 1 time in total.
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: SOMETIMES THE sCRIPT WORKS OTHER TIME i get RuntimeError

Post by master68 » Fri Sep 28, 2018 3:40 pm

chivracq wrote: But concerning your Case, simply use '!ERRORIGNORE' I would think... :idea:
i made some search before i posted here and i found similar issue and I have used "SET !ERRORIGNORE YES" but it didn't solve the issue coz it ignored the DIV meaning didn't check the coinhive captcha this was unable to submit, the submit button remained on "submit status" and didn't turn in to "sent status" and the form stayed idle was not sent
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: sometimes the script works other time i get RuntimeError

Post by master68 » Fri Sep 28, 2018 3:49 pm

i am using

iMacros 10.0.5
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: sometimes the script works other time i get RuntimeError

Post by chivracq » Fri Sep 28, 2018 4:06 pm

master68 wrote:i am using

Code: Select all

iMacros 10.0.5
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
Okay...!, we finally have your FCI...! :D (And you've edited your Thread Title, perfect...!)
(You can use a few Caps if you want, that's OK, it's just 'CAPS Only' which is "annoying" and considered like "Shouting" on a (Tech) Forum...)

Hum, when using v10.0.x for CR/FF, you need as well to mention if you are using the 'Free' or 'PE' Version as many Commands and Functionality are disabled in the 'Free' Versions for those 2 Browsers, I reckon it will be 'PE' for you if you have some Captcha Solving Mechanism in your Script which would require Local File-Access I would think...?, which is only available in the 'PE' Version...
master68 wrote:
chivracq wrote: But concerning your Case, simply use '!ERRORIGNORE' I would think... :idea:
i made some search before i posted here and i found similar issue and I have used "SET !ERRORIGNORE YES" but it didn't solve the issue coz it ignored the DIV meaning didn't check the coinhive captcha this was unable to submit, the submit button remained on "submit status" and didn't turn in to "sent status" and the form stayed idle was not sent
Yeah well, then together with '!ERRORIGNORE' you could make the 'WAIT SECONDS=1801' Conditional to avoid your Script waiting for 30 Min if "stg" went wrong in that "Round"... :idea:
(Search the Forum on "conditional+wait" if you need more Info / Code Example(s)...)

And using the same (Conditional) Mechanism, you could make the 'POS=1' Conditional as well (with 'POS=1' / 'POS=0') for the Click on the 'claim' Button if you don't want the Script to click on that Button if the 'verify-me' Element was not found... (Or you could use 'Relative Positioning'...)
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: sometimes the script works other time i get RuntimeError

Post by master68 » Fri Sep 28, 2018 4:31 pm

chivracq wrote:
master68 wrote:i am using
Yeah well, then together with '!ERRORIGNORE' you could make the 'WAIT SECONDS=1801' Conditional to avoid your Script waiting for 30 Min if "stg" went wrong in that "Round"... :idea:
(Search the Forum on "conditional+wait" if you need more Info / Code Example(s)...)

And using the same (Conditional) Mechanism, you could make the 'POS=1' Conditional as well (with 'POS=1' / 'POS=0') for the Click on the 'claim' Button if you don't want the Script to click on that Button if the 'verify-me' Element was not found... (Or you could use 'Relative Positioning'...)

well the 1801 secs is for the script to wait 30 mins before it executes again, because we have to wait 30 mins between every claims as for the captcha I am not sure if you have an idea about coinhive it is the easiest captcha all you need to do is tick the checkbox and you are done so this scripts made to check the captcha box and click on claim button and you are done THE MAIN ISSUE that is really driving me crazy and that I am not getting is why sometimes the script sees the captcha checkbox and click it and why the other time it doesn't see it so it goes into an error saying that the element was not found????

when i use play loop sometimes it runs for more than 10 times (this means around 5 hours of work) sometimes runs 3 times sometimes run only 1 time (for 30 mins only) and stops listing that error will paste it again in case you need it rather than searching again for it:

RuntimeError: element DIV specified by ID:verify-me was not found, line: 4

i really appreciate your help but it really sound a crazy issue :) i might understand if it never recognizes the element so we have to search why it is not seeing it BUT in my case the script sees the element when it wants and ignore it when it wants hehe this never happened to me:)
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: sometimes the script works other time i get RuntimeError

Post by chivracq » Sat Sep 29, 2018 4:01 am

master68 wrote:
chivracq wrote:
master68 wrote:i am using
Yeah well, then together with '!ERRORIGNORE' you could make the 'WAIT SECONDS=1801' Conditional to avoid your Script waiting for 30 Min if "stg" went wrong in that "Round"... :idea:
(Search the Forum on "conditional+wait" if you need more Info / Code Example(s)...)

And using the same (Conditional) Mechanism, you could make the 'POS=1' Conditional as well (with 'POS=1' / 'POS=0') for the Click on the 'claim' Button if you don't want the Script to click on that Button if the 'verify-me' Element was not found... (Or you could use 'Relative Positioning'...)
well the 1801 secs is for the script to wait 30 mins before it executes again, because we have to wait 30 mins between every claims as for the captcha I am not sure if you have an idea about coinhive it is the easiest captcha all you need to do is tick the checkbox and you are done so this scripts made to check the captcha box and click on claim button and you are done THE MAIN ISSUE that is really driving me crazy and that I am not getting is why sometimes the script sees the captcha checkbox and click it and why the other time it doesn't see it so it goes into an error saying that the element was not found????

when i use play loop sometimes it runs for more than 10 times (this means around 5 hours of work) sometimes runs 3 times sometimes run only 1 time (for 30 mins only) and stops listing that error will paste it again in case you need it rather than searching again for it:

Code: Select all

RuntimeError: element DIV specified by ID:verify-me was not found, line: 4
i really appreciate your help but it really sound a crazy issue :) i might understand if it never recognizes the element so we have to search why it is not seeing it BUT in my case the script sees the element when it wants and ignore it when it wants hehe this never happened to me:)
Yeah, well, like I already said, => "Conditional 'WAIT'"...!! :roll:

(And don't ask me to write your Script for you, I don't do it, I never/or_very-very-very-rarely do it, and always at "my Initiative", and I actually also normally never help for Captcha and/or Financial/Game Winning/Benefit...)

=> You'll need to do your "Homework" a little bit and post your Script and what you did with my "Suggs", then I might still be willing to "guide" you a bit, but don't expect too much from me, especially if you are not too-too Open or Motivated yourself... :|

Hum, OK, about this "coinhive" Captcha Service, never heard of them before, you can post a Link maybe...?, could be interesting for other iMacros Users if FIO is not needed... (Hum, even if I don't really care, I don't help for Captcha anyway, ah-ah...!!) :wink:
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: sometimes the script works other time i get RuntimeError

Post by master68 » Sat Sep 29, 2018 5:30 am

dear i am not asking for captcha help forget about this captcha the issue or the main issue is that sometimes the scripts finds the element and sometimes doesnt this is my main problem that i am unable to figure it out when trying to test to see what is going on i do it manually so i try to play and see so the page loads normally and everything appears on it the captcha checkbox and the claim button but the script doesn't see the DIV related to the captcha so i keep clicking play 3-4 times at the scripts click the check box and then the button and sometimes it works smoothly many times without any interference from myself
i didn't ask and i will not ask anyone to write my script all what i am asking a help in figuring this issue out as i gave up i did a lot of search it didn't lead me to anything i either need a help why and how to avoid the script not seeing this element or force it to keep trying to run the script until it sees it normally (from my manual testing it takes 3-5 trials) takes few trails and then works and do the task

again do not think about the captcha and all that what you have to think of that there it a checkbox has to be clicked and then a button to submit it is really a simple script i wonder why it is making my life so hard in missing sometimes this check box? if it is not working and never seeing that checkbox i would suspect anything wrong within the script but since it is working BUT stopping other times this gave me headache...
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: sometimes the script works other time i get RuntimeError

Post by chivracq » Sat Sep 29, 2018 9:15 am

master68 wrote:dear i am not asking for captcha help forget about this captcha the issue or the main issue is that sometimes the scripts finds the element and sometimes doesnt this is my main problem that i am unable to figure it out when trying to test to see what is going on i do it manually so i try to play and see so the page loads normally and everything appears on it the captcha checkbox and the claim button but the script doesn't see the DIV related to the captcha so i keep clicking play 3-4 times at the scripts click the check box and then the button and sometimes it works smoothly many times without any interference from myself
i didn't ask and i will not ask anyone to write my script all what i am asking a help in figuring this issue out as i gave up i did a lot of search it didn't lead me to anything i either need a help why and how to avoid the script not seeing this element or force it to keep trying to run the script until it sees it normally (from my manual testing it takes 3-5 trials) takes few trails and then works and do the task

again do not think about the captcha and all that what you have to think of that there it a checkbox has to be clicked and then a button to submit it is really a simple script i wonder why it is making my life so hard in missing sometimes this check box? if it is not working and never seeing that checkbox i would suspect anything wrong within the script but since it is working BUT stopping other times this gave me headache...
Yeah-yeah, don't worry, I knew from the Beginning what your Thread/Site was about... I kept answering because you were actually very reactive and learning very quick... :wink:

But, tja, back to my "Advice" about the ''Conditional WAIT', you need to first extract the 'verify-me' Element to check if it is present or not, and if iMacros "says" it is not present, then it is definitely not present, ah-ah...!, and upon that 'EXTRACT'/Check, using 'EVAL()' you can click or not what you want, or conditionally compute your 'WAIT' Statement for ''30 min' or '0 sec'..., that's the Purpose of a 'Conditional WAIT' if you've checked that like I already encouraged you to a few times... (but I didn't see any Follow-up Script from your Side)...
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: sometimes the script works other time i get RuntimeError

Post by master68 » Sat Sep 29, 2018 7:09 pm

after testing and retesting i was able to catch the issue and I think you would laugh when you hear it :) the frame caused this
so the code has
FRAME F=14
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
so when iMacros catch the F=14 run the script if not it shows the element error what I found that it is changing from f=14 to 13 and 15 and I am afraid it will change to other digit too so when i ran

Code: Select all

SET !ERRORIGNORE YES
FRAME F=13
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
FRAME F=14
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
FRAME F=15
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
it worked now and i guess that was the solution but can you help me what to use for the frame? F=? to avoid all this? i really appreciate i am a newbie just started so i am starting to learn and I am not that experienced or advanced like you and the other techs here I wish i can be like you one day thx for the great help...
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: sometimes the script works other time i get RuntimeError

Post by chivracq » Sat Sep 29, 2018 9:34 pm

master68 wrote:after testing and retesting i was able to catch the issue and I think you would laugh when you hear it :) the frame caused this
so the code has

Code: Select all

FRAME F=14
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
so when iMacros catch the F=14 run the script if not it shows the element error what I found that it is changing from f=14 to 13 and 15 and I am afraid it will change to other digit too so when i ran

Code: Select all

SET !ERRORIGNORE YES
FRAME F=13
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
FRAME F=14
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
FRAME F=15
TAG POS=1 TYPE=DIV ATTR=ID:verify-me
it worked now and i guess that was the solution but can you help me what to use for the frame? F=? to avoid all this? i really appreciate i am a newbie just started so i am starting to learn and I am not that experienced or advanced like you and the other techs here I wish i can be like you one day thx for the great help...
Ah yep indeed, that's a "common" Case indeed that the Frame_Nb is changing... :(
I should have mentioned it because of your 'FRAME F=0' for the 'claim' Button, but you had truncated many Lines from your Script already..., and you didn't mention the URL of your Site, then I couldn't have a look by myself, I would have noticed it straight away otherwise....

You can check in the Source if that Frame has an ID and use the 'FRAME NAME=' Parameter then, instead of the 'FRAME F=n' Parameter..., that would be the easiest and most reliable Method... :idea:

If you were using a '.js' Script (only available on iMacros for FF until v9.0.3, '.js' Scripts are not supported anymore in v10.0.2 for FF), you could loop through the Frame_Nb's until you've identified the "correct" one, (you'll find a few Threads about the "Technique" on the Forum), or you need indeed to repeat that Block of Code 15 times for all possible Nb's..., with a short '!TIMEOUT_STEP'=0...

Or it is possible to first extract the whole 'BODY' of the Page (with 'EXTRACT=HTM') and to count the Nb of Frames (using 'EVAL()' + 'split()' or 'match()') to compute dynamically the correct Nb to use, but an 'EXTRACT=HTM' on the whole 'BODY' of a Page can sometimes take several Seconds on "large" Pages, the 15x times Repeat-Block might work quicker actually... :wink:

Or if you don't want to repeat 15x times that Block, you could still use the Conditional 'WAIT' Method I had mentioned, and only try on say 3 Frame_Nb's for example (starting with the 3 Nb's that are most often being used) on one Loop, and if not successful with any of these 3 Nb's, compute a 'WAIT=0', and on the next Loop "try" on 3 different Nb's using 'EVAL()' + 'Modulo[15]' on '!LOOP', several Threads about that on the Forum as well, but it's already a little bit "High Level", ah-ah...!, it's a little bit more "Advanced" than the Conditional 'WAIT'...
- (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...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: sometimes the script works other time i get RuntimeError

Post by chivracq » Sun Oct 14, 2018 10:06 pm

Hum, saw you checking the Forum and I thought you were going (finally) to reply in this Thread, 2 weeks after my last Reply..., but nope...? :o

You asked some Qt in your last Post about identifying the "correct" Frame_Nb..., to which I replied with several Suggs/Sols, you would need to follow up or I might not bother to help you again, next time you'll open a Thread..., and/or I will then ask you to first follow up and finish this one "correctly" and I will then probably only answer that "next" Thread after the same amount of time I will have been "waiting" for a Follow-up on this one, just saying... Tic-Tac-Tic-Tac... :idea:
- (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...
master68
Posts: 8
Joined: Fri Sep 28, 2018 2:02 pm

Re: sometimes the script works other time i get RuntimeError

Post by master68 » Mon Oct 15, 2018 12:50 pm

sorry still stuck with this code everytime i fix something i get something else this is why i didn't reply first i didn't fix it and second i found myself so annoying so i thought keep searching the forum and helping myself (as you asked me before you said i have to learn and work hard) and when i found myself ready to be thew one you asked I will post another reply... as i said earlier i am not a programmer so it is hard to work with me because i can barely understand your recommendations all what i am doing now is learning thx for the follow up you are very kind
I am using:
iMacros 10.0.5 free
chrome 69.0.3497.100 (Official Build) (64-bit)
windows 10
Post Reply