Skip to content

Commit 1064665

Browse files
#39 Add support of "options.extensions" configuration property for Edge driver
1 parent b255e5f commit 1064665

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ string sectionBoolValue = AppConfig.Current.Section.BoolProperty;
322322
},
323323
"arguments": [ "string", "string" ], // Chrome, Firefox and Opera specific.
324324
"excludedArguments": [ "string", "string" ], // Chrome and Opera specific.
325-
"extensions": [ "string", "string" ], // Chrome and Opera specific.
325+
"extensions": [ "string", "string" ], // Chrome, Edge and Opera specific.
326326
"encodedExtensions": [ "string", "string" ], // Chrome and Opera specific.
327327
"windowTypes": [ "string", "string" ], // Chrome specific.
328328
"performanceLoggingPreferences": { // Chrome specific.

src/Atata.Configuration.Json/DriverOptionsJsonSection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class DriverOptionsJsonSection : JsonSection
2424
// Chrome and Opera specific.
2525
public string[] ExcludedArguments { get; set; }
2626

27-
// Chrome and Opera specific.
27+
// Chrome, Edge and Opera specific.
2828
public string[] Extensions { get; set; }
2929

3030
// Chrome and Opera specific.

src/Atata.Configuration.Json/Mapping/EdgeDriverJsonMapper.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OpenQA.Selenium.Edge;
1+
using System.Linq;
2+
using OpenQA.Selenium.Edge;
23

34
namespace Atata.Configuration.Json
45
{
@@ -8,5 +9,13 @@ protected override EdgeAtataContextBuilder CreateDriverBuilder(AtataContextBuild
89
{
910
return builder.UseEdge();
1011
}
12+
13+
protected override void MapOptions(DriverOptionsJsonSection section, EdgeOptions options)
14+
{
15+
base.MapOptions(section, options);
16+
17+
if (section.Extensions?.Any() ?? false)
18+
options.AddExtensionPaths(section.Extensions);
19+
}
1120
}
1221
}

0 commit comments

Comments
 (0)