Refresh Page if Captcha appears?

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
Cornysz
Posts: 21
Joined: Sun Apr 12, 2020 1:48 pm

Refresh Page if Captcha appears?

Post by Cornysz » Sat Jul 24, 2021 12:07 pm

Code: Select all

BUILD=8970419
Freeware
Win 10
Firefox 56
I will explain the title of this post more clearly
So my issue in my script automation is, if I try to log in something in my site, the login page sometimes need to fill captcha, but sometimes it doesnt.
The captcha can be skipped by doing only refresh the page. So for example, if I tried login with email & pass, and then the captcha appear, it makes me manually solved it. But if I refresh the page before I solved the captcha manually, I can login easily without that.

So the question is, how to detect that captcha element? If the site contain captcha element, imacros script will be use REFRESH and continue normal, but if there's no contained captcha elemnent, it'll continue like normal. (Hoping the script doesnt need .js, so pure .iim script :lol: )

I hope any reader here understand my question, Thank you in advance
Last edited by Cornysz on Sun Jul 25, 2021 4:47 am, edited 3 times in total.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Doing other stuff if the page contains "specific" Element/text

Post by chivracq » Sat Jul 24, 2021 12:19 pm

Cornysz wrote:
Sat Jul 24, 2021 12:07 pm

Code: Select all

BUILD=8970419
Freeware
Win 10
Firefox 56
I will explain the title of this post more clearly
So my issue in my script automation is, if I try to log in something in my site, the login page sometimes need to fill captcha, but sometimes it doesnt.
The captcha can be skipped by doing only refresh the page. So for example, if I tried login with email & pass, and then the captcha appear, it makes me manually solved it. But if I refresh the page before I solved the captcha manually, I can login easily without that.

So the question is, how to detect that captcha element? If the site contain captcha element, imacros script will be use REFRESH and continue normal, but if there's no contained captcha elemnent, it'll continue like normal. (Hoping the script doesnt need .js, so pure .iim script :lol: )

I hope any reader here understand my question, Thank you in advance

Hum, yep indeed, I was wondering what your Thread Title meant... :?
"stuff" and "specific" are always pretty "vague" Terms to use on the Forum anyway...
+ You have a Typo already in "specific"... (But OK, don't worry, will be quicker if I correct it myself... [Done] :wink: )

Well, what you want is a "Conditional 'REFRESH'", or "Conditional Reload", => Keywords to use to search the Forum... :idea:

Maybe a "better" (more self-explanatory) Thread Title would be:
"Refresh Page if Captcha appears?" :idea:
(I only edited your Thread Title to correct 2 Typos, I let you decide if you "agree" with me, or even find another "more Descriptive" Thread Title..., or want to keep your current one...)

And most "Conditional + [Something]" Scenarios/Threads usually belong to the 'Data Extraction' Sub-Forum as you'll be using/needing the 'EXTRACT' Mechanism, => in this Case to detect if the Captcha is present or not... :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...
Cornysz
Posts: 21
Joined: Sun Apr 12, 2020 1:48 pm

Re: Doing other stuff if the page contains "specific" Element/text

Post by Cornysz » Sun Jul 25, 2021 4:52 am

chivracq wrote:
Sat Jul 24, 2021 12:19 pm
Hum, yep indeed, I was wondering what your Thread Title meant... :?
"stuff" and "specific" are always pretty "vague" Terms to use on the Forum anyway...
+ You have a Typo already in "specific"... (But OK, don't worry, will be quicker if I correct it myself... [Done] :wink: )

Well, what you want is a "Conditional 'REFRESH'", or "Conditional Reload", => Keywords to use to search the Forum... :idea:

Maybe a "better" (more self-explanatory) Thread Title would be:
"Refresh Page if Captcha appears?" :idea:
(I only edited your Thread Title to correct 2 Typos, I let you decide if you "agree" with me, or even find another "more Descriptive" Thread Title..., or want to keep your current one...)

And most "Conditional + [Something]" Scenarios/Threads usually belong to the 'Data Extraction' Sub-Forum as you'll be using/needing the 'EXTRACT' Mechanism, => in this Case to detect if the Captcha is present or not... :idea:
Done edited the thread title with your idea, Thank you.

Anyway for the conditional, sadly I don't find anything with correctly fixing my problem :( , I don't know if I misunderstood the content or something.
But.. Do you think that Conditional Refresh can be by solo .iim script? So I don't need the .js implementation, is it possible?
Also can you give me the keyword or explanation about that Conditional RELOAD, please?

To be honest, I'm very confused about Conditional in .IIM script, I think it couldn't be done :shock: (Need .js) am I right? It will very usefull if there's if else mechanic in .iim script
Thank you in advance!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Refresh Page if Captcha appears?

Post by chivracq » Sun Jul 25, 2021 12:27 pm

Cornysz wrote:
Sun Jul 25, 2021 4:52 am
Done edited the thread title with your idea, Thank you.

Anyway for the conditional, sadly I don't find anything with correctly fixing my problem :( , I don't know if I misunderstood the content or something.
But.. Do you think that Conditional Refresh can be by solo .iim script? So I don't need the .js implementation, is it possible?
Also can you give me the keyword or explanation about that Conditional RELOAD, please?

To be honest, I'm very confused about Conditional in .IIM script, I think it couldn't be done :shock: (Need .js) am I right? It will very usefull if there's if else mechanic in .iim script
Thank you in advance!

Oh...!?, good!, you've "adopted" "my" Thread Title, alright...! :D
But you should also use that same/new Title for your Replies, instead of keeping using the "old" Title, or those Posts lose the "Benefit" of the new Title, ah-ah...! :idea:
(When quoting, your Post will automatically inherit the Title of the quoted Post, you need to use the 'Reply' Button for your Post to "get" the Thread Title, and you can still do some "Inline Quoting" inside that Post...)

>>>

Hum, not complicated to type 2 Words in the 'Search' Box for the Forum, I would think...!? :o => "conditional refresh", and one of the first Results is a Post by @Tom from @TechSup ("I'm curious chivracq, how would YOU do a conditional REFRESH using macro code alone?"), with my Reply just above that Hit where I explained 4 Ways to achieve 'Conditional 'REFRESH'' Func in pure '.iim'... :idea: :P 8)

And I didn't mention 'F5' because I "think" that 'F5'-Key doesn't work with the 'EVENT' Mode... I must have already tried/tested that, I don't "remember"... But the 'Ctrl^r' Method does work for sure... (and you are using v8.9.7 for FF which supports the 'EVENT' Mode...). :idea: 8)
- (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...
Post Reply