@@ -28,10 +28,14 @@ namespace OpenQA.Selenium
2828 [ Serializable ]
2929 public class UnhandledAlertException : WebDriverException
3030 {
31+ /// <summary>
32+ /// Gets the text of the unhandled alert.
33+ /// </summary>
34+ public string AlertText { get ; } = string . Empty ;
35+
3136 /// <summary>
3237 /// Initializes a new instance of the <see cref="UnhandledAlertException"/> class.
3338 /// </summary>
34- [ Obsolete ( "Use a constructor overload that sets alertText" ) ]
3539 public UnhandledAlertException ( )
3640 : base ( )
3741 {
@@ -42,7 +46,6 @@ public UnhandledAlertException()
4246 /// a specified error message.
4347 /// </summary>
4448 /// <param name="message">The message that describes the error.</param>
45- [ Obsolete ( "Use a constructor overload that sets alertText" ) ]
4649 public UnhandledAlertException ( string message )
4750 : base ( message )
4851 {
@@ -68,15 +71,9 @@ public UnhandledAlertException(string message, string alertText)
6871 /// <param name="message">The error message that explains the reason for the exception.</param>
6972 /// <param name="innerException">The exception that is the cause of the current exception,
7073 /// or <see langword="null"/> if no inner exception is specified.</param>
71- [ Obsolete ( "Use a constructor overload that sets alertText" ) ]
7274 public UnhandledAlertException ( string message , Exception innerException )
7375 : base ( message , innerException )
7476 {
7577 }
76-
77- /// <summary>
78- /// Gets the text of the unhandled alert.
79- /// </summary>
80- public string AlertText { get ; } = string . Empty ;
8178 }
8279}
0 commit comments