2

There is popup which raised when trying to close tab of Microsoft Edge browser,

Do we have any capabilities by which it can be control ?

Or is there any relevant settings, from which it may not ask.

Tried : driver.switchTo().alert().accept();

But it was not controlled.

Ishita Shah
  • 3,609
  • 1
  • 15
  • 46

1 Answers1

2

This message can be occur when user had fill some data in the form of webpage and try to close the tab.

To avoid this message, user can clear the data may help to suppress the message.

In JQUERY, User can try to use $(window).off('beforeunload'); or $(window).off('beforeunload.windowReload');

Calling .off() with no arguments removes all handlers attached to the elements. Specific event handlers can be removed on elements by providing combinations of event names, namespaces, selectors, or handler function names.

Reference:

jQuery docs

You can also try to make a test with other browsers and check whether you receive same message or not. If there is specific steps to produce the issue then try to provide us. We will try to make a test with it and try to find a solution or work around for it.

Deepak-MSFT
  • 8,111
  • 1
  • 6
  • 14
  • Thanks for the answer, I will try same. It is on Gmail, for Edge only. Chrome & Firefox do not use this concern to close the tab. You can try to open and close Gmail for Edge browser. – Ishita Shah Oct 15 '18 at 04:57