@@ -47,19 +47,39 @@ public class SafariOptions : DriverOptions
47
47
{
48
48
private const string BrowserNameValue = "safari" ;
49
49
private const string EnableAutomaticInspectionSafariOption = "safari:automaticInspection" ;
50
- private const string EnableAutomticProfilingSafariOption = "safari:automaticProfiling" ;
50
+ private const string EnableAutomaticProfilingSafariOption = "safari:automaticProfiling" ;
51
51
52
52
private bool enableAutomaticInspection = false ;
53
53
private bool enableAutomaticProfiling = false ;
54
+ private bool technologyPreview = false ;
54
55
55
56
/// <summary>
56
57
/// Initializes a new instance of the <see cref="SafariOptions"/> class.
57
58
/// </summary>
58
59
public SafariOptions ( ) : base ( )
59
60
{
60
61
this . BrowserName = BrowserNameValue ;
62
+ this . technologyPreview = false ;
61
63
this . AddKnownCapabilityName ( SafariOptions . EnableAutomaticInspectionSafariOption , "EnableAutomaticInspection property" ) ;
62
- this . AddKnownCapabilityName ( SafariOptions . EnableAutomticProfilingSafariOption , "EnableAutomaticProfiling property" ) ;
64
+ this . AddKnownCapabilityName ( SafariOptions . EnableAutomaticProfilingSafariOption , "EnableAutomaticProfiling property" ) ;
65
+ }
66
+
67
+ /// <summary>
68
+ /// Allows the Options class to be used with a Safari Technology Preview driver
69
+ /// </summary>
70
+ public void UseTechnologyPreview ( )
71
+ {
72
+ this . technologyPreview = true ;
73
+ this . BrowserName = "Safari Technology Preview" ;
74
+ }
75
+
76
+ /// <summary>
77
+ /// Gets or sets a value indicating whether to have the driver preload the
78
+ /// Web Inspector and JavaScript debugger in the background.
79
+ /// </summary>
80
+ public bool TechnologyPreview
81
+ {
82
+ get { return this . technologyPreview ; }
63
83
}
64
84
65
85
/// <summary>
@@ -98,7 +118,7 @@ public override ICapabilities ToCapabilities()
98
118
99
119
if ( this . enableAutomaticProfiling )
100
120
{
101
- capabilities . SetCapability ( EnableAutomticProfilingSafariOption , true ) ;
121
+ capabilities . SetCapability ( EnableAutomaticProfilingSafariOption , true ) ;
102
122
}
103
123
104
124
return capabilities . AsReadOnly ( ) ;
0 commit comments