How to handle pop up

how to handle pop up that useer need to click ok?
I’ve tried using WebUI.acceptAlert() but it doesn’t work.
The pop up comes up when user upload a file where Data already exist.!
popup%20confirmation|690x362

How to handle this issue?

Hi @jeanetelleng,

Did you already tried to inspect the pop up confirmation box? And try to inspect the ‘Ok’ button then use WebUI.click(findTestObject(“OK_Button”)) to click.

this also didn’t work

and also this one:

‘Upload Data already exist’
if (WebUI.verifyElementPresent(findTestObject(‘Object Repository/VA Payment/VA Payment Maker/alert_confirmation’), 10, FailureHandling.OPTIONAL)) {
‘OK’
WebUI.waitForElementClickable(findTestObject(‘Object Repository/VA Payment/VA Payment Maker/confirmation_ok’), 10, FailureHandling.STOP_ON_FAILURE)

CustomKeywords.'customKeywords.CustomKeywordJS.clickUsingJS'(findTestObject('Object Repository/VA Payment/VA Payment Maker/confirmation_ok'),
GlobalVariable.wait_js_long_time)
//WebUI.click(findTestObject('Object Repository/VA Payment/VA Payment Maker/confirmation_ok'))

}

hello,

try to use CSS Locator as locator
in FF or Chrome select element --> right click --> inspect --> dev window will open --> right click --> copy css selector
add it to your object properties as using css