Pop up trigered by Firefox

Hello, i am doing some tests using a custom Firefox profile and found that Katalon cannot handle pop-up for certificate as shown below:

In the pop-up, i need to uncheck the Remember this decision and click on button OK.

@kazurayam your advised please.

This is not an html popup. you will need to use a keyword to:
get the current browser to ensure it is FireFox. This example is checking for IE.

  String browser = DriverFactory.getExecutedBrowser().getName()
  boolean IE = false
  if (browser.contains('IE')) {
  	IE = true
  }

Then use robot to navigate the contents. For example:

  Robot robot = new Robot();
  robot.setAutoDelay(350);
  robot.delay(1000);
  robot.keyPress(KeyEvent.VK_TAB);

You can navigate and interact with what is displayed with robot. In the above, I tab away from whatever starting element is selected when it is displayed. In your case you will need to most likely send “VK_SPACE” then send “VK_TAB” then “VK_ENTER”

It is Firefox since i have checked it using the autoIT software (Autoit Full Installation and AutoIt Script Editor) as described here: https://docs.katalon.com/katalon-studio/docs/using-autoit-for-authentication-in-katalon-studio.html

However, how can i solved my issue?

autoIT is for authentication. Use robot for other browser/system screens.

Do you have a sample script that works please?

@danpoleary i have tried the code you sent me, but it is not working.
As you can see, the dot (highlight) remained here itself

Can you please help? @Katalon_Studio

@danpoleary, i got the following errors in console logs:

console.error: Region.jsm: "Error fetching region" (new Error("TIMEOUT", "resource://gre/modules/Region.jsm", 772))
console.error: Region.jsm: "Failed to fetch region" (new Error("TIMEOUT", "resource://gre/modules/Region.jsm", 419))

@ThanhTo, @Zarashima any solution please?

Each action in robot is just like you typing on keyboard. So for a tab, you need both

		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);

If you write your code to do multiples of the above with a robot.delay(2000) you should see the highlighted area change every 2 seconds.

What I would do, is manually run your test, and when the certificate window opens, count how many tabs it takes to get to the button you want to click. Repeat the the two actions above that number of times.

I use the following in a keyword for ntlm login for CRM in our app. Don’t forget you will need to import:
import java.awt.Robot
import java.awt.Toolkit
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection
import java.awt.event.KeyEvent

def loginAuthenticate(String username, String password) {

	def modifyCSVFile = new ModifyCSVFile()

	if (password == "default") {
		password = modifyCSVFile.GetkeyValue('CRMCommonPwd')
	}


	String browser = DriverFactory.getExecutedBrowser().getName()
	boolean IE = false
	if (browser.contains('IE')) {
		IE = true
	}

	println 'Browser: ' + browser

	Robot robot = new Robot();
	robot.setAutoDelay(250);
	StringSelection ss = new StringSelection(username);
	Toolkit toolkit = Toolkit.getDefaultToolkit()
	Clipboard clipboard = toolkit.getSystemClipboard().setContents(ss, null);
	robot.delay(1000);
	if (IE) {
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_ENTER);
		robot.keyRelease(KeyEvent.VK_ENTER);
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_ENTER);
		robot.keyRelease(KeyEvent.VK_ENTER);
	}
	robot.keyPress(KeyEvent.VK_CONTROL);
	robot.keyPress(KeyEvent.VK_V);
	robot.keyRelease(KeyEvent.VK_V);
	robot.keyRelease(KeyEvent.VK_CONTROL);
	robot.keyPress(KeyEvent.VK_TAB);
	robot.keyRelease(KeyEvent.VK_TAB);
	ss = new StringSelection(password);
	Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
	robot.keyPress(KeyEvent.VK_CONTROL);
	robot.keyPress(KeyEvent.VK_V);
	robot.keyRelease(KeyEvent.VK_V);
	robot.keyRelease(KeyEvent.VK_CONTROL);
	robot.keyPress(KeyEvent.VK_TAB);
	robot.keyRelease(KeyEvent.VK_TAB);
	if (IE) {
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
		robot.keyPress(KeyEvent.VK_TAB);
		robot.keyRelease(KeyEvent.VK_TAB);
	}
	robot.keyPress(KeyEvent.VK_ENTER);
	robot.keyRelease(KeyEvent.VK_ENTER);
}

Hello, i have checked the issue more in depth and found an issue with Katalon (if i’m not mistaken).
Can you please see this Unable to exit a click action when a non-html pop up is triggered from browser( firefox)

That is not a katalon issue. The mozilla popup is not an web popup but an application popup. Use robot to traverse the popup and keypress/keyrelease the enter key on the OK button. Once you trigger the OK button, the click action should complete.

I do this all the time and have not had issues.

Dan

Hello @danpoleary, is there any means which we can do a web call so that i can showcase the issue?

Hello @ziyaad.ellahee, It will be difficult since I am working on some covid related activities. Could you try something for me? Run your test, and when the certificate window pops up, quick click “OK”. Does your test continue?