I want to suppress the above alert mentioned in title while running my katalon scripts

Attaching screen shots for same

enter image description here

2 Answers

Vel Guru On

It possible we have to run the chromedriver in safe mode.please try the below code

System.setProperty("webdriver.chrome.driver", "C:/chromedriver/chromedriver.exe");
        String downloadFilepath = "D:/MyDeskDownload";
        HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
        chromePrefs.put("profile.default_content_settings.popups", 0);
        chromePrefs.put("download.default_directory", downloadFilepath);
        chromePrefs.put("safebrowsing.enabled", "true"); 
        ChromeOptions options = new ChromeOptions();
        options.setExperimentalOption("prefs", chromePrefs);
        DesiredCapabilities cap = DesiredCapabilities.chrome();
        cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
        cap.setCapability(ChromeOptions.CAPABILITY, options);
        WebDriver driver = new ChromeDriver(cap);
Mate Mrše On

You can set up the browser to automatically download files. The following is taken from Katalon forum:

First you add Chrome preferences:

HashMap<String, Object> chromePrefs = new HashMap<String, Object>()
chromePrefs.put("download.default_directory", downloadPath)
chromePrefs.put("download.prompt_for_download", false)

And then specify the path to ChromeDriver and add experimental options:

System.setProperty("webdriver.chrome.driver", "DriverFactory.getChromeDriverPath()")
ChromeOptions options = new ChromeOptions()
options.setExperimentalOption("prefs", chromePrefs)


You will need to import the following (or press CTRL+SHIFT+O for automatic imports):

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