Complete Automation Testing Tutorials

Modal dialog with progress bar

If you need to block a user screen while loading some data or doing heavy computations, you can use this snippet to show modal dialog with progress bar.

Examples All dialogs will be automatically closed

Simple dialog - Autoclose after 2 seconds

waitingDialog.show();

Dialog with custom message - Autoclose after 3 seconds

waitingDialog.show('Hello Alert !!!');

Dialog with custom settings - Autoclose after 3 seconds

waitingDialog.show('Hello Mr. Alert !', {dialogSize: 'sm', progressType: 'warning'});

Dialog with some callback firing after it was hidden

waitingDialog.show('Dialog with callback on hidden',{onHide: function () {alert('Callback!');}});