Alert thrown before execution in Katalon

Hi,

While executing the open browser command in katalon studio, alert is thrown. And we are using Katalon v7.2.7

Please find the screenshot of the alert displayed.

alert_directory

There are two alerts thrown,

  1. One for handling the smart wait in chrome options
  2. Second one is on handling the app data in local folder.

I was searching for a solution but i was not able to find it out.

Can you suggest me to overcome this issue. Because this is very big show stopper for us to proceed our automation script execution for infinite time.

Thanks in advance.

This happens due to security restrictions from your system administrator. The only way around it is to instantiate your own custom driver, and set an experimental option:

import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import com.kms.katalon.core.webui.driver.DriverFactory

// create a custom driver and tell Katalon to use it...
ChromeOptions options = new ChromeOptions()
options.setExperimentalOption("useAutomationExtension", false)
System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverPath())
DriverFactory.changeWebDriver(new ChromeDriver(options))

// be sure to use navigateToUrl() instead of openBrowser()...
WebUI.navigateToUrl("http://myUrl.com")

If this works, you would probably want to wrap this in a keyword so you don’t have to do it in every script.

1 Like

Thanks @Brandon_Hein

Does this support for alert which is throwing with an error for chrome driver extension or for the alert which I have posted in the above query?

I will check with your provided solution.

This handles the alert from your above screenshot.