Accept a popup when selected value change



  • Katalon 5.4.2
  • Chrome 67

I have to use Katalon to record test cases on an existing web application.

**A popup appears (to validate my choice) when the selected option changed.
I don’t know how to accept it because it appears when I select an other option. And when I use acceptAlert() like below it’s not working because I’m not out of

Please share your HTML code and screenshots of your popup, if possible.

I’m sorry but I can’t put screenshot.

HTML Code (without data)**

<select name="A87" size="1" onclick="clWDUtil.pfGetTraitement('A87',0,undefined)(event); " onchange="clWDUtil.pfGetTraitement('A87',11,undefined)(event); " id="A87" class="Simple-Center A87 padding webdevclass-riche" tabindex="8" autocomplete="off">
    <option value="1">--select--</option>
    <option value="2">Value 1</option>
    <option value="3">Value 2</option>
    <option value="4">Value 3</option>
    <option selected value="5">Value 4</option>
    <option value="6">Value 5</option>

Popup appears when I click on Value 2 for example.

Do you have any error messages?

No, the problem is that I can’t accept the alert because I haven’t finish to change the value. Popup seems to be a confirmation.

But are you able to select the option in the first place (if you remove acceptAlert())? Obviously, in the script, not manually…

Also, what kind of selector do you have for the WebUI.selectOptionByValue()? Regex? Are you sure the third parameter needs to be ‘true’?

Yes I can select an option. However, when I click on the wishing option, the popup appears.
I will try to set the third parameter at ‘false’.

**Process :

  • I open the page
  • I open the element
  • I select an option
  • (Confirmation popup appears) --> I want to accept this popup
  • End of the focus on element

The selector used for the element is a xpath expression : //*[@id=“A87”]

Any chance you can just use a “enter” key press so it presses the accept button regardless of the location?