Skip to content

Commit

Permalink
Adding code to .NET tests to make switching Firefox implementations e…
Browse files Browse the repository at this point in the history
…asier

This allows the user so switch between Marionette and the Selenium project
implementations of the Firefox driver by simply changing the .config file.
  • Loading branch information
jimevans committed Oct 13, 2015
1 parent 996b551 commit 9daa6ce
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dotnet/test/firefox/MarionetteWebDriver.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace OpenQA.Selenium.Firefox
{
// This is a simple wrapper class to create a FirefoxDriver that
// uses the Marionette implementation and has no parameters in the
// constructor.
public class MarionetteWebDriver : FirefoxDriver
{
public MarionetteWebDriver()
: base(new FirefoxOptions())
{
}
}
}
5 changes: 5 additions & 0 deletions dotnet/test/firefox/WebDriver.Firefox.Tests.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<appSettings>
<add key="Driver" value="OpenQA.Selenium.Firefox.FirefoxDriver" />
<add key="Assembly" value="WebDriver" />
<!--NOTE: To test Marionette, uncomment the below lines (the "Driver"
and "Assembly" settings), and comment the standard ones above here.
DO NOT COMMIT THIS CHANGE AFTER YOU ARE DONE!-->
<!--add key="Driver" value="OpenQA.Selenium.Firefox.MarionetteWebDriver" />
<add key="Assembly" value="WebDriver.Firefox.Tests" /-->
<add key="DriverName" value="Firefox"/>
<add key="RemoteCapabilities" value="firefox"/>

Expand Down
1 change: 1 addition & 0 deletions dotnet/test/firefox/WebDriver.Firefox.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<Compile Include="FirefoxProfileManagerTest.cs" />
<Compile Include="FirefoxProfileTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MarionetteWebDriver.cs" />
</ItemGroup>
<ItemGroup>
<None Include="WebDriver.Firefox.Tests.config">
Expand Down

0 comments on commit 9daa6ce

Please sign in to comment.