Chrome browser - How to Disable Save Address popup

Chrome browser - How to Disable Save Address popup.

1 Like

Hi @discover.selenium,

The only thing that I have found that works, at least in a Chrome browser is to use incognito as follows:
**You can copy the following to a new test case and give it a try.
Maybe others would have a better solution.

//Add the following to the end of the 'import' section in your test case
import com.kms.katalon.core.configuration.RunConfiguration as RunConfiguration 
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

//Start of test steps:
//Using incognito disables the 'Save Address' dialog
RunConfiguration.setWebDriverPreferencesProperty('args', ['--incognito'])
//More test steps that would result in a 'Save Address' dialog opening.



More here:

1 Like

you can also try robot class with esc key press option

1 Like

Hey @dineshh, This has not worked for me using Robot class… Can you share your working code?

1 Like

@Dave_Evers , i have used in the past projects, i have moved out of project and team with no access to working code. let me try to create a code snippet and post here

Hi @discover.selenium & @dineshh , After some research I have discovered that if I press the ESC key manually for the ‘Save Address’ dialog (popup) it does NOT close, so likely Robot will NOT do the trick… I did find the following work-around (not pretty, but it works), that if trigged at the right point creates a new tab, then closes the tab and then switches back to the main tab. The result is that the tab and dialog are closed. Insert the steps just after the dialog/popup displays, you might need to play-around with it to find the spot you want.

// Only add to the import section of your test case if NOT already present 
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

//Steps that trigger the dialog/popup
WebUI.executeJavaScript(';', [])
mainWindow = WebUI.getWindowIndex()
WebUI.closeWindowIndex(mainWindow + 1)
//Steps after dialog/popup closes