Captcha Handle: manually

In an attempt to handle a login page with captcha, Is there any possibility to pause the execution (say after entering login id and password) and resume after user manually enters the captcha and resume execution (clicking on login button and continuing with the flow). I’ve searched and haven’t found it yet. So it would be of a great help if anyone could help me with this

when i need manual interference i use the following keyword, passing a title and message to give context on why i am pausing execution, then i do what needs to be done and dimiss the frame, after which the code will execute as normal

you would call the keyword with, for example, CustomKeywords.‘Functions.showAlert’(‘captcha’, ‘please solve the captcha’)

@Keyword
	public static boolean showAlert(String title, String message){
		int returnValue = 0;
		JFrame frame = new JFrame(title)
		frame.setAlwaysOnTop(true)
		frame.requestFocus()
		returnValue = JOptionPane.showConfirmDialog(frame, message,title, JOptionPane.YES_NO_OPTION);
		assert returnValue==JOptionPane.YES_OPTION;
		return returnValue==JOptionPane.YES_OPTION;
	}
2 Likes

@kenzie.rigole Unless you know something I don’t, this won’t work for Katalon Recorder.

@AdityanG Can you confirm, did you post to the correct forum category?

You can try with while loop with condition to check if user is logged in and loop will go forever until user manually log in. It would be something like: while currentUrl is “https://yourpage.com/log-in” pause 1s and repeat.