File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,20 @@ public ChromiumAndroidOptions AndroidOptions
190
190
/// should use the legacy OSS protocol dialect or a dialect compliant with the W3C
191
191
/// WebDriver Specification.
192
192
/// </summary>
193
+ [ Obsolete ( "Spec Compliant Protocol is the only supported protocol" ) ]
193
194
public bool UseSpecCompliantProtocol
194
195
{
195
196
get { return this . useSpecCompliantProtocol ; }
196
- set { this . useSpecCompliantProtocol = value ; }
197
+ set
198
+ {
199
+ if ( ! value )
200
+ {
201
+ throw new ArgumentException ( "Only the spec compliant protocol is supported, " +
202
+ "Please update to W3C Syntax: " +
203
+ "https://www.selenium.dev/blog/2022/legacy-protocol-support/" ) ;
204
+ }
205
+ this . useSpecCompliantProtocol = true ;
206
+ }
197
207
}
198
208
199
209
/// <summary>
Original file line number Diff line number Diff line change 1
- using NUnit . Framework ;
1
+ using System ;
2
+ using NUnit . Framework ;
3
+ using OpenQA . Selenium . Environment ;
2
4
3
5
namespace OpenQA . Selenium . Chrome
4
6
{
5
7
[ TestFixture ]
6
8
public class ChromeSpecificTests : DriverTestFixture
7
9
{
10
+ [ OneTimeTearDown ]
11
+ public void RunAfterAnyTests ( )
12
+ {
13
+ EnvironmentManager . Instance . CloseCurrentDriver ( ) ;
14
+ EnvironmentManager . Instance . WebServer . Stop ( ) ;
15
+ }
16
+
17
+ [ Test ]
18
+ public void W3CFalse ( )
19
+ {
20
+ Assert . Throws < ArgumentException > ( ( ) => new ChromeOptions
21
+ {
22
+ UseSpecCompliantProtocol = false
23
+ } ) ;
24
+ }
8
25
}
9
26
}
You can’t perform that action at this time.
0 commit comments