How to do semi automatic login?

Hi everyone,

I’m dealing with a site that has a login and after enter credentials requests so complete a captcha.

Currently, the macro enters automatically the user and password and after click in submit the macro gives 2 minutes (pause 120000) to solve the captcha by a human intervention.

Sometimes the captcha could be done by a human in less than a minute, so I’d like to avoid wait for 2 minutes.

Then, is there a way to tell the macro to continue once the captcha is completed without to put a fixed “pause” time? Like a Event “when captcha element” reports the captcha was done successfully.

Thanks for any help

There are several good options:

  • PAUSE | 0 (wait for user to press continue) ← easiest option :slight_smile:
  • PROMPT command (wait for user input)
  • You can have two macros: One to navigate until captcha, and the second one for the remaining part (the 2nd one will have no OPEN command inside).
  • Make a Do...While loop that checks for the disappearance of the captcha e. g. with verifyElementPresent or verifyElementNotPresent. If the captcha is gone, the loop breaks and the macro continues. For more details see How to make a file wait for selection - #2 by admin
1 Like

Thanks so much Plankton for the answer. I’ll tests first the easiest one.

Regarding the “Do…While” option, would be put that loop just after the submit button, then the captcha would appear and meanwhile the human is solving the captcha, the macro is checking some element that appears only while captcha is active? Would be like that?

I’ve tried a simple macro for “PAUSE|0” but doesn´t stop the macro.

I’ve tried like below, what I’m doing wrong?

pause|0
echo|text after continue

Exactly! You can either check for an element that is there while the captcha is active, and wait for it to disappear. Or you can check for an element to appear after the captcha is solved, such as a “Welcome…” text. If you prefer, you can also do these checks with computer vision using the visualVerify command.

This looks good. What goes wrong? With Pause 0 the macro waits until you click RESUME:

resume

Not sure what happened. I put the pause|0 at the end of the macro and didnt´t work. Now in the middle of the code it works. Probably after refresh the test with “open|url” the issue was fix. Thanks for the help