How to set the chrome options value "setExperimentalOption("useAutomationExtension", false)"

How to set the chrome options value “setExperimentalOption(“useAutomationExtension”, false)”

Similar to

ChromeOptions options = new ChromeOptions();

options.setExperimentalOption(“useAutomationExtension”, false);

WebDriver driver = new ChromeDriver(options);

Hi Sampath,

you are almost there. Just tell Katalon that you want to use your own driver:

DriverFactory.changeWebDriver(driver)

And use Katalon as usual (but skip WebUI.openBrowser() method).

2 Likes

Hi Marek,

Thanks alot for the help. it worked like a charm.

Is there a way to set the same from Project>>Settings>>Desired Capabilities>>Web UI>>Chrome and use the default driver?

Yes there is, and this is the best way, in my opinion, to handle desired capabilities:

This is by far the best solution if you want to have a set of capabilities apply to all Test Cases that use the driver. Otherwise, you would need to get and configure the driver from Katalon before every script.

1 Like

Thanks Brandon for your response. Agreed this is the best way. I am not able to figure out how to set the experimental option i.e options.setExperimentalOption(“useAutomationExtension”, false); from project settings desired capabilities.

While I’ve never messed with experimental options, I might try something like:

image

This puts the following into the chrome.properties JSON as expected:

"useAutomationExtension":false

Again, I’m relatively unfamiliar with how experimental options are handled by chrome/chromedriver, so this is just a guess.

This is helpful, all. Thanks especially to @Brandon_Hein.

One question. Which combination of args and prefs turns OFF the “This type of file can harm your computer…” pop up? Would like to just download automatically. Got this to work in Firefox, but it seems Chrome has a different way of handling this. Any help appreciated.

image

here is what I currently have, but it’s not working:

Put it in your prefs dictionary as follows:

I’ve got them in a dictionary, but I don’t think I have the right combinations of prefs (or args). Here is what I currently have (and I still get the popup)

safebrowsing.enabled should be true

Boom, that got it. How counter-intuitive. I assumed we wanted “safe” off in this case. Weird.
I also found I didn’t need most of that other stuff. I thinned it down to the below.
THANK YOU, @Brandon_Hein

Indeed it is. Thanks for reminding me though, I’m going to write a tip right now for how I determine the correct desired capability settings for various things. Stay tuned :sunglasses:

Done:

Well done, @Brandon_Hein, thanks! Do you have a similar process for Firefox?

I don’t. In fact, I don’t even have FF installed :sweat_smile: But I can’t imagine the process being much different.

I have problem with my chrome

image

I tried several options without success


image
Has anyone ever managed to do that?

Hi @Brandon_Hein, it’s not working

I cannot know exactly which setting you need to configure. Please follow this guide to figure it out:

I have problem with my chrome

image

I tried several options without success


image

2019-07-02_10h20_04

Has anyone ever managed to do that?