Handling "Leave Site" prompt

  1. Write something in form on a site
  2. Exit the site
  3. Get dialog “Leave Site” saying “Changes you made may not be saved”.
  4. It has two buttons - Leave and Cancel.

Have you encountered this in browser tests? Is there any way to access and operate these buttons?

Hi,

Handling will be dependent of the way the message is designed in the application.
If it’s a “homemade” prompt/alert, you may have to build keyword, wait and an click specific info available.

Other than that you could use this type of keyword :

Wait for alert

Or

Handle alert

That gives ability to choose accept or not, get the message or verify it usually.

Regards
Charlie

2 Likes

Handle alert action=ACCEPT

1 Like

Thank you all.

Handle Future Dialogs    action=accept

This did the trick.

1 Like