Skip to content

Commit c243c2c

Browse files
committed
Removing 'primary' from W3C-compliant pointer actions
1 parent b72a1ff commit c243c2c

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

dotnet/src/webdriver/Interactions/Actions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class Actions : IAction
2929
{
3030
private IWebDriver driver;
3131
private ActionBuilder actionBuilder = new ActionBuilder();
32-
private PointerInputDevice defaultMouse = new PointerInputDevice(PointerKind.Mouse, true, "default mouse");
32+
private PointerInputDevice defaultMouse = new PointerInputDevice(PointerKind.Mouse, "default mouse");
3333
private KeyInputDevice defaultKeyboard = new KeyInputDevice("default keyboard");
3434

3535
private IKeyboard keyboard;

dotnet/src/webdriver/Interactions/PointerInputDevice.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,33 @@ internal enum MouseButton
9595
internal class PointerInputDevice : InputDevice
9696
{
9797
private PointerKind pointerKind;
98-
private bool isPrimary;
9998

10099
/// <summary>
101100
/// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
102101
/// </summary>
103102
public PointerInputDevice()
104-
: this(PointerKind.Mouse, true)
103+
: this(PointerKind.Mouse)
105104
{
106105
}
107106

108107
/// <summary>
109108
/// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
110109
/// </summary>
111110
/// <param name="pointerKind">The kind of pointer represented by this input device.</param>
112-
/// <param name="isPrimary">A value indicating whether the pointer device is the primary pointer device.</param>
113-
public PointerInputDevice(PointerKind pointerKind, bool isPrimary)
114-
: this(pointerKind, isPrimary, Guid.NewGuid().ToString())
111+
public PointerInputDevice(PointerKind pointerKind)
112+
: this(pointerKind, Guid.NewGuid().ToString())
115113
{
116114
}
117115

118116
/// <summary>
119117
/// Initializes a new instance of the <see cref="PointerInputDevice"/> class.
120118
/// </summary>
121119
/// <param name="pointerKind">The kind of pointer represented by this input device.</param>
122-
/// <param name="isPrimary">A value indicating whether the pointer device is the primary pointer device.</param>
123120
/// <param name="deviceName">The unique name for this input device.</param>
124-
public PointerInputDevice(PointerKind pointerKind, bool isPrimary, string deviceName)
121+
public PointerInputDevice(PointerKind pointerKind, string deviceName)
125122
: base(deviceName)
126123
{
127124
this.pointerKind = pointerKind;
128-
this.isPrimary = isPrimary;
129125
}
130126

131127
/// <summary>
@@ -148,7 +144,6 @@ public override Dictionary<string, object> ToDictionary()
148144
toReturn["id"] = this.DeviceName;
149145

150146
Dictionary<string, object> parameters = new Dictionary<string, object>();
151-
parameters["primary"] = this.isPrimary;
152147
parameters["pointerType"] = this.pointerKind.ToString().ToLowerInvariant();
153148
toReturn["parameters"] = parameters;
154149

0 commit comments

Comments
 (0)