Popup with identical behavior but different results

Hello everyone.

I’m using Katalon Recorder 5.9.0 on Brave.
I have a problem with a popup that doesn’t want to take my selection into account.
When I run my script, I visually see the checkbox validated, but when the script move on to click on the validation button, my choice is not taken into account.

On my app I have another popup with identical behavior that works very well.

If I change the order of the popups in my script, the problem also changes popup.

Here is the commands

click | id=id_a_list_2
click | xpath=//*/text()[normalize-space(.)='${departure}']/parent::*
pause |  | 1000
click | xpath=//div[@onclick='javascript:saveChoixRef(2,8);']
verifyText | id=id_a_list_2 | ${departure} **=============>>>> OK**
click | id=id_a_list_3
click | xpath=//*/text()[normalize-space(.)='${arrival}']/parent::*
pause |  | 1000
click | xpath=//div[@onclick='javascript:saveChoixRef(3,8);']
verifyText | id=id_a_list_3 | ${arrival} **=============>>>> KO**

Here is what it look like in the application.
image

If i change the ordre of the popup in the script, the problem change too

click | id=id_a_list_3
click | xpath=//*/text()[normalize-space(.)='${arrival}']/parent::*
pause |  | 1000
click | xpath=//div[@onclick='javascript:saveChoixRef(3,8);']
verifyText | id=id_a_list_3 | ${arrival} **=============>>>> OK**
click | id=id_a_list_2
click | xpath=//*/text()[normalize-space(.)='${departure}']/parent::*
pause |  | 1000
click | xpath=//div[@onclick='javascript:saveChoixRef(2,8);']
verifyText | id=id_a_list_2 | ${departure} **=============>>>> KO**

An other problem is that Katalon doesn’t allow me to check the first choice for only those two popup.

The same command

 xpath=//*/text()[normalize-space(.)='${myVar}']/parent::*

works well for the other 5 popup windows on the same page. I can check the first element without trouble.
image

Any idea of what i missed??

1 Like

Have you tried some waits for the element to be clickable?

Hi
Yes i have.

But some picture is missing to have a better view of my problem.
image

I think my problem is related to the doubled labels.
Somehow, Katalon has to look for the first occurrence of the targeted label, and in cache, it stops on the first popup called.

This could explain the first behavior.
Do you think using absolute or relative xpath could solve thits?

On the other hand, I’m still puzzled by the fact that it doesn’t take my choice on the first popup label.
it only happens on these two popup.