Skip to content

Commit

Permalink
#88 Remove Opera driver configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed Jul 18, 2022
1 parent 6bc81e0 commit b4def25
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 66 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ with help of `{env:VarName}` template insertions.
}
],
"driver": { // Use "driver" for single driver support.
"type": "chrome", // Supports: "remote", "chrome", "firefox", "internetexplorer", "safari", "opera", "edge" and custom mappers registered via DriverJsonMapperAliases.Register method.
"type": "chrome", // Supports: "remote", "chrome", "firefox", "internetexplorer", "safari", "edge" and custom mappers registered via DriverJsonMapperAliases.Register method.
// Custom RemoteWebDriver type can also be passed as a full type name, e.g.: "Namespace.Class, MyAssembly".
"alias": "custom_alias", // Use aliases when you have several drivers of the same type.
"remoteAddress": "http://127.0.0.1:8888/wd/hub", // Remote driver specific.
"options": { // Configures driver options.
"type": "chrome", // Remote driver specific.
// Supports: chrome, firefox, internetexplorer, safari, opera, edge.
// Supports: "chrome", "firefox", "internetexplorer", "safari", "edge".
"loggingPreferences": { // Dictionary of logType and logLevel.
// Invokes SetLoggingPreference method of DriverOptions for each item.
"browser": "Info",
Expand All @@ -291,7 +291,7 @@ with help of `{env:VarName}` template insertions.
"globalcap2": 5,
"globalcap3": "str"
},
"additionalBrowserOptions": { // Chrome, Firefox, Edge, InternetExplorer and Opera specific.
"additionalBrowserOptions": { // Chrome, Firefox, Edge and InternetExplorer specific.
// Dictionary of additional browser options.
"cap1": true,
"cap2": 5,
Expand All @@ -308,10 +308,10 @@ with help of `{env:VarName}` template insertions.
"proxyAutoConfigUrl": "string",
"bypassAddresses": [ "string", "string" ]
},
"arguments": [ "string", "string" ], // Chrome, Firefox, Edge and Opera specific.
"excludedArguments": [ "string", "string" ], // Chrome, Edge and Opera specific.
"extensions": [ "string", "string" ], // Chrome, Edge and Opera specific.
"encodedExtensions": [ "string", "string" ], // Chrome, Edge and Opera specific.
"arguments": [ "string", "string" ], // Chrome, Firefox and Edge specific.
"excludedArguments": [ "string", "string" ], // Chrome and Edge specific.
"extensions": [ "string", "string" ], // Chrome and Edge specific.
"encodedExtensions": [ "string", "string" ], // Chrome and Edge specific.
"windowTypes": [ "string", "string" ], // Chrome and Edge specific.
"performanceLoggingPreferences": { // Chrome and Edge specific.
// Configures instance of OpenQA.Selenium.Chromium.ChromiumPerformanceLoggingPreferences type.
Expand All @@ -320,13 +320,13 @@ with help of `{env:VarName}` template insertions.
"bufferUsageReportingInterval": "00:01:10",
"tracingCategories": [ "string", "string" ]
},
"userProfilePreferences": { // Chrome, Edge and Opera specific.
"userProfilePreferences": { // Chrome and Edge specific.
// Dictionary of preferenceName and preferenceValue.
// Invokes AddUserProfilePreference method of driver specific options (e.g., ChromeOptions) for each item.
"pref1": false,
"pref2": "str"
},
"localStatePreferences": { // Chrome, Edge and Opera specific.
"localStatePreferences": { // Chrome and Edge specific.
// Dictionary of preferenceName and preferenceValue.
// Invokes AddLocalStatePreference method of driver specific options (e.g., ChromeOptions) for each item.
"pref1": 2.7,
Expand Down
14 changes: 7 additions & 7 deletions src/Atata.Configuration.Json/DriverOptionsJsonSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ public class DriverOptionsJsonSection : JsonSection

public JsonSection AdditionalOptions { get; set; }

// Chrome, Firefox, Edge, InternetExplorer and Opera specific.
// Chrome, Firefox, Edge and InternetExplorer specific.
public JsonSection AdditionalBrowserOptions { get; set; }

public ProxyJsonSection Proxy { get; set; }

// Chrome, Firefox, Edge and Opera specific.
// Chrome, Firefox and Edge specific.
public string[] Arguments { get; set; }

// Chrome, Edge and Opera specific.
// Chrome and Edge specific.
public string[] ExcludedArguments { get; set; }

// Chrome, Edge and Opera specific.
// Chrome and Edge specific.
public string[] Extensions { get; set; }

// Chrome, Edge and Opera specific.
// Chrome and Edge specific.
public string[] EncodedExtensions { get; set; }

// Chrome and Edge specific.
Expand All @@ -34,10 +34,10 @@ public class DriverOptionsJsonSection : JsonSection
// Chrome and Edge specific.
public DriverPerformanceLoggingPreferencesJsonSection PerformanceLoggingPreferences { get; set; }

// Chrome, Edge and Opera specific.
// Chrome and Edge specific.
public JsonSection UserProfilePreferences { get; set; }

// Chrome, Edge and Opera specific.
// Chrome and Edge specific.
public JsonSection LocalStatePreferences { get; set; }

// Firefox specific.
Expand Down
1 change: 0 additions & 1 deletion src/Atata.Configuration.Json/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
[assembly: SuppressMessage("Design", "CA1000:Do not declare static members on generic types", Justification = "<Pending>", Scope = "member", Target = "~P:Atata.Configuration.Json.JsonConfig`1.Current")]
[assembly: SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "<Pending>", Scope = "member", Target = "~P:Atata.Configuration.Json.DriverPerformanceLoggingPreferencesJsonSection.TracingCategories")]
[assembly: SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "<Pending>", Scope = "member", Target = "~P:Atata.Configuration.Json.DriverProfileJsonSection.Extensions")]
[assembly: SuppressMessage("Critical Code Smell", "S1541:Methods and properties should not be too complex", Justification = "<Pending>", Scope = "member", Target = "~M:Atata.Configuration.Json.OperaDriverJsonMapper.MapOptions(Atata.Configuration.Json.DriverOptionsJsonSection,OpenQA.Selenium.Opera.OperaOptions)")]
[assembly: SuppressMessage("Major Code Smell", "S138:Functions should not have too many lines of code", Justification = "<Pending>", Scope = "member", Target = "~M:Atata.Configuration.Json.JsonConfigMapper.Map``1(``0,Atata.AtataContextBuilder)~Atata.AtataContextBuilder")]
[assembly: SuppressMessage("Critical Code Smell", "S1541:Methods and properties should not be too complex", Justification = "<Pending>", Scope = "member", Target = "~M:Atata.Configuration.Json.JsonConfigMapper.Map``1(``0,Atata.AtataContextBuilder)~Atata.AtataContextBuilder")]
[assembly: SuppressMessage("Critical Code Smell", "S1541:Methods and properties should not be too complex", Justification = "<Pending>", Scope = "member", Target = "~M:Atata.Configuration.Json.JsonConfigMapper.MapAttributes(Atata.Configuration.Json.AttributesJsonSection,Atata.AtataContextBuilder)")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ static DriverJsonMapperAliases()
Register<FirefoxDriverJsonMapper>(DriverAliases.Firefox);
Register<InternetExplorerDriverJsonMapper>(DriverAliases.InternetExplorer);
Register<SafariDriverJsonMapper>(DriverAliases.Safari);
Register<OperaDriverJsonMapper>(DriverAliases.Opera);
Register<EdgeDriverJsonMapper>(DriverAliases.Edge);
}

Expand Down
46 changes: 0 additions & 46 deletions src/Atata.Configuration.Json/Mapping/OperaDriverJsonMapper.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ private static IDriverJsonMapper GetOptionsMapper(string typeName)
return new InternetExplorerDriverJsonMapper();
case DriverAliases.Safari:
return new SafariDriverJsonMapper();
case DriverAliases.Opera:
return new OperaDriverJsonMapper();
case DriverAliases.Edge:
return new EdgeDriverJsonMapper();
case null:
Expand Down

0 comments on commit b4def25

Please sign in to comment.