Skip to content

Commit 85ed311

Browse files
authored
Merge branch 'trunk' into py_path
2 parents fdc1a44 + 3fbd0e5 commit 85ed311

22 files changed

+64
-444
lines changed

dotnet/src/webdriver/Interactions/Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public Actions MoveByOffset(int offsetX, int offsetY)
445445
/// <returns>A self-reference to this <see cref="Actions"/>.</returns>
446446
public Actions MoveToLocation(int offsetX, int offsetY)
447447
{
448-
this.actionBuilder.AddAction(this.defaultMouse.CreatePointerMove(CoordinateOrigin.Viewport, offsetX, offsetY, DefaultMouseMoveDuration));
448+
this.actionBuilder.AddAction(this.getActivePointer().CreatePointerMove(CoordinateOrigin.Viewport, offsetX, offsetY, DefaultMouseMoveDuration));
449449
return this;
450450
}
451451

dotnet/test/common/AlertsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public void ShouldAllowTheUserToGetTheTextOfAPrompt()
172172
}
173173

174174
[Test]
175-
public void AlertShouldNotAllowAdditionalCommandsIfDimissed()
175+
public void AlertShouldNotAllowAdditionalCommandsIfDismissed()
176176
{
177177
driver.Url = CreateAlertPage("cheese");
178178

dotnet/test/common/AvailableLogsTest.cs

Lines changed: 0 additions & 106 deletions
This file was deleted.

dotnet/test/common/CustomDriverConfigs/DefaultSafariDriver.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ namespace OpenQA.Selenium.Safari
66
public class DefaultSafariDriver : SafariDriver
77
{
88
public DefaultSafariDriver()
9-
: this(DefaultService, new SafariOptions())
9+
: base(DefaultOptions)
1010
{
1111
}
1212

13-
public DefaultSafariDriver(SafariDriverService service, SafariOptions options)
14-
: base(service, options)
13+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
14+
public DefaultSafariDriver(SafariOptions options)
15+
: base(options)
1516
{
1617
}
1718

18-
public static SafariDriverService DefaultService
19+
public static SafariOptions DefaultOptions
1920
{
20-
get { return SafariDriverService.CreateDefaultService("/usr/bin"); }
21+
get { return new SafariOptions(); }
2122
}
2223
}
2324
}
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
4-
using System.Threading.Tasks;
5-
61
namespace OpenQA.Selenium.Chrome
72
{
83
public class DevChannelChromeDriver : ChromeDriver
94
{
10-
public DevChannelChromeDriver(ChromeDriverService service)
11-
: this(service, DefaultOptions)
5+
public DevChannelChromeDriver()
6+
: base(DefaultOptions)
127
{
138
}
149

15-
public DevChannelChromeDriver(ChromeDriverService service, ChromeOptions options)
16-
: base(service, options)
10+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
11+
public DevChannelChromeDriver(ChromeOptions options)
12+
: base(options)
1713
{
1814
}
1915

2016
public static ChromeOptions DefaultOptions
2117
{
22-
// The below path to the Chrome Developer Channel executable is obviously hard-coded.
23-
// On non-Windows OSes, and for custom install locations, you will need to add a
24-
// property to the below options: BinaryLocation = <path to Chrome.exe>
25-
get { return new ChromeOptions() { BinaryLocation = @"C:\Program Files (x86)\Google\Chrome Dev\Application\chrome.exe", AcceptInsecureCertificates = true }; }
18+
get { return new ChromeOptions() { BrowserVersion = "dev" }; }
2619
}
2720
}
2821
}
Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,21 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
6-
71
namespace OpenQA.Selenium.Edge
82
{
93
public class DevChannelEdgeDriver : EdgeDriver
104
{
11-
private static string servicePath = string.Empty;
12-
135
public DevChannelEdgeDriver()
14-
: this(DefaultService, DefaultOptions)
6+
: base(DefaultOptions)
157
{
168
}
179

18-
public DevChannelEdgeDriver(EdgeDriverService service, EdgeOptions options)
19-
: base(service, options)
10+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
11+
public DevChannelEdgeDriver(EdgeOptions options)
12+
: base(options)
2013
{
2114
}
2215

2316
public static EdgeOptions DefaultOptions
2417
{
25-
get {
26-
// The below path to the Edge Developer Channel executable is obviously hard-coded.
27-
// On non-Windows OSes, and for custom install locations, you will need to add a
28-
// property to the below options: BinaryLocation = <path to MSEdge.exe>
29-
return new EdgeOptions()
30-
{
31-
BinaryLocation = @"C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe"
32-
};
33-
}
34-
}
35-
36-
public static EdgeDriverService DefaultService
37-
{
38-
get
39-
{
40-
EdgeDriverService service = EdgeDriverService.CreateDefaultService(ServicePath);
41-
return service;
42-
}
43-
}
44-
45-
public static string ServicePath
46-
{
47-
get { return servicePath; }
48-
set { servicePath = value; }
18+
get { return new EdgeOptions() { BrowserVersion = "dev" }; }
4919
}
5020
}
5121
}
Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,24 @@
1-
using OpenQA.Selenium.Remote;
2-
31
namespace OpenQA.Selenium.IE
42
{
53
// This is a simple wrapper class to create an InternetExplorerDriver that
64
// uses the enables RequireWindowFocus as the default input simplation.
75
public class EdgeInternetExplorerModeDriver : InternetExplorerDriver
86
{
9-
private static string servicePath = string.Empty;
10-
11-
public EdgeInternetExplorerModeDriver(InternetExplorerDriverService service)
12-
: this(service, DefaultOptions)
13-
{
14-
}
157

16-
public EdgeInternetExplorerModeDriver(InternetExplorerDriverService service, InternetExplorerOptions options)
17-
: base(service, options)
8+
public EdgeInternetExplorerModeDriver()
9+
: base(DefaultOptions)
1810
{
1911
}
2012

21-
public static string ServicePath
13+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
14+
public EdgeInternetExplorerModeDriver(InternetExplorerOptions options)
15+
: base(options)
2216
{
23-
get { return servicePath; }
24-
set { servicePath = value; }
25-
}
26-
27-
public static InternetExplorerDriverService DefaultService
28-
{
29-
get
30-
{
31-
InternetExplorerDriverService service;
32-
if (string.IsNullOrEmpty(servicePath))
33-
{
34-
service = InternetExplorerDriverService.CreateDefaultService();
35-
}
36-
else
37-
{
38-
service = InternetExplorerDriverService.CreateDefaultService(servicePath);
39-
}
40-
41-
// For debugging purposes, one can uncomment the following lines
42-
// to generate a log from the driver executable. Please do not
43-
// commit changes to this file with these lines uncommented.
44-
// service.LogFile = @"iedriver.log";
45-
// service.LoggingLevel = InternetExplorerDriverLogLevel.Debug;
46-
return service;
47-
}
4817
}
4918

5019
public static InternetExplorerOptions DefaultOptions
5120
{
52-
get { return new InternetExplorerOptions() { RequireWindowFocus = true, UsePerProcessProxy = true, AttachToEdgeChrome = true, EdgeExecutablePath = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" }; }
21+
get { return new InternetExplorerOptions() { RequireWindowFocus = true, UsePerProcessProxy = true, AttachToEdgeChrome = true }; }
5322
}
5423
}
5524
}
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
using OpenQA.Selenium.Remote;
2-
31
namespace OpenQA.Selenium.Firefox
42
{
53
// This is a simple wrapper class to create a FirefoxDriver that
64
// uses the Marionette implementation and has no parameters in the
75
// constructor.
86
public class NightlyChannelFirefoxDriver : FirefoxDriver
97
{
10-
public NightlyChannelFirefoxDriver(FirefoxDriverService service)
11-
: this(service, DefaultOptions)
8+
public NightlyChannelFirefoxDriver()
9+
: base(DefaultOptions)
1210
{
1311
}
1412

15-
public NightlyChannelFirefoxDriver(FirefoxDriverService service, FirefoxOptions options)
16-
: base(service, options)
13+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
14+
public NightlyChannelFirefoxDriver(FirefoxOptions options)
15+
: base(options)
1716
{
1817
}
1918

2019
public static FirefoxOptions DefaultOptions
2120
{
22-
// The below path to the Firefox Nightly Channel executable is obviously hard-coded.
23-
// On non-Windows OSes, and for custom install locations, you will need to add a
24-
// property to the below options: BrowserExecutableLocation = <path to Firefox.exe>
25-
get { return new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files\Firefox Nightly\firefox.exe", AcceptInsecureCertificates = true }; }
21+
get { return new FirefoxOptions() { BrowserVersion = "nightly" }; }
2622
}
2723
}
2824
}

dotnet/test/common/CustomDriverConfigs/SafariTechnologyPreviewDriver.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,16 @@ namespace OpenQA.Selenium.Safari
66
public class SafariTechnologyPreviewDriver : SafariDriver
77
{
88
public SafariTechnologyPreviewDriver()
9-
: this(DefaultService, DefaultOptions)
9+
: base(DefaultOptions)
1010
{
1111
}
1212

13-
public SafariTechnologyPreviewDriver(SafariDriverService service, SafariOptions options)
14-
: base(service, options)
13+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
14+
public SafariTechnologyPreviewDriver(SafariOptions options)
15+
: base(options)
1516
{
1617
}
1718

18-
public static SafariDriverService DefaultService
19-
{
20-
get { return SafariDriverService.CreateDefaultService("/Applications/Safari Technology Preview.app/Contents/MacOS"); }
21-
}
22-
2319
public static SafariOptions DefaultOptions
2420
{
2521
get

dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
4-
using System.Threading.Tasks;
5-
61
namespace OpenQA.Selenium.Chrome
72
{
83
public class StableChannelChromeDriver : ChromeDriver
94
{
10-
public StableChannelChromeDriver(ChromeDriverService service, ChromeOptions options)
11-
: base(service, options)
5+
public StableChannelChromeDriver()
6+
: base(DefaultOptions)
7+
{
8+
}
9+
10+
// Required for dynamic setting with `EnvironmentManager.Instance.CreateDriverInstance(options)`
11+
public StableChannelChromeDriver(ChromeOptions options)
12+
: base(options)
1213
{
1314
}
1415

0 commit comments

Comments
 (0)