How to use NOT IN "Chrome is being controlled by automated test software", but in normal mode?

how to use NOT IN “Chrome is being controlled by automated test software”, but in normal mode?

no one understands what I wrote about?

import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions

import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverPath())
ChromeOptions opt = new ChromeOptions()
opt.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"))
ChromeDriver driver = new ChromeDriver(opt)
DriverFactory.changeWebDriver(driver)
WebUI.navigateToUrl('www.katalon.com')

Edit: This is actually better solution, previous one only hides info panel.

1 Like

it dosent work/ give pelase another way

Still works for me. I updated previous post as formatting was broken. Try again please.

That infobar is just a notice and shouldn’t cause any issues. Why would you want to hide it?

1 Like

i need to open
chrome.exe" --profile-directory=“Profile 4”

I am new to katalon, where to set this one. Can you please elaborately explain

Create custom keyword and put the code there.

public static void openBrowserNoAutomationMode() {
    System.setProperty("webdriver.chrome.driver", DriverFactory.getChromeDriverPath())
    ChromeOptions opt = new ChromeOptions()
    opt.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"))
    ChromeDriver driver = new ChromeDriver(opt)
    DriverFactory.changeWebDriver(driver)
    WebUI.navigateToUrl('www.katalon.com') 
}

And use it in your test then.

1 Like

Hi. Google brought me to this part of the forum to find and answer on this question. Althought the above solution might work, I was looking for a more general solution. I.e.: I wanted Katalon to run WebUI browser as normal, so not every time specifically for chrome via a custom keyword “openBrowserNoAutomationMode()”. I just want to run exclude that popup every time chrome is launched in my tests.

So, for others who also end-up here: The answer do to this properly is via the Desired Capabilities. It can actually be found here:

Basically it is adding this setting:


(for me, the “disable-infobars” argument works. Apparently it’s reinstated in the latest versions of chrome, so no longer deprecated).

A very nice manual for similar problems:

[Big thanks to those original posters!]

FYI: for me it’s needed as I noticed my imageComparer (using Ashot) seemed to be taking different screenshot depending on the browsers. It seemed to work for firefox, headless firefox and chrome headless, but only for certain screenshots in chrome it looked off! For instance, it was just taking half the screenshot of the webelement. I noticed disabling the popup in Chrome fixed this.