-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] Update Chromium-based browsers to correclty inherit Options
- Loading branch information
Showing
5 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
dotnet/test/common/CustomDriverConfigs/StableChannelEdgeDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenQA.Selenium.Edge | ||
{ | ||
public class StableChannelEdgeDriver : EdgeDriver | ||
{ | ||
private static string servicePath = string.Empty; | ||
|
||
public StableChannelEdgeDriver() | ||
: this(DefaultService, DefaultOptions) | ||
{ | ||
} | ||
|
||
public StableChannelEdgeDriver(EdgeDriverService service, EdgeOptions options) | ||
: base(service, options) | ||
{ | ||
} | ||
|
||
public static EdgeOptions DefaultOptions | ||
{ | ||
get { | ||
// The below path to the Edge Developer Channel executable is obviously hard-coded. | ||
// On non-Windows OSes, and for custom install locations, you will need to add a | ||
// property to the below options: BinaryLocation = <path to MSEdge.exe> | ||
return new EdgeOptions() | ||
{ | ||
UseChromium = true, | ||
BinaryLocation = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" | ||
}; | ||
} | ||
} | ||
|
||
public static EdgeDriverService DefaultService | ||
{ | ||
get | ||
{ | ||
EdgeDriverService service = EdgeDriverService.CreateChromiumService(ServicePath); | ||
return service; | ||
} | ||
} | ||
|
||
public static string ServicePath | ||
{ | ||
get { return servicePath; } | ||
set { servicePath = value; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters