0

How do you Webaii guys out there handle javascript confirm popup's?

I can't find a ConfirmDialog class in ArtOfTest.WebAii.Win32.Dialogs, and if I try to use AlertDialog instead I get an ArgumentException due to validation rules in the ctor for the AlertDialog class: "System.ArgumentException : Alert dialog can only be dismissed using an OK or CLOSE buttons"

My codesnippet:

Manager.DialogMonitor.AddDialog(new AlertDialog(ActiveBrowser, DialogButton.CANCEL)); Manager.DialogMonitor.Start();

ahockley
  • 3,696
  • 24
  • 26

2 Answers2

1

Actually your problem is that the alert dialog is missing.

So you need to add something like this to ignote the unexpected dialog handlers:

myManager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;

Add the previous code before you click on the element which trigger the alert box.