From 23cf0af4c50eb65cda05976bdbb0dd393c56d2b3 Mon Sep 17 00:00:00 2001 From: Michael Render Date: Mon, 2 Dec 2024 15:38:05 -0500 Subject: [PATCH] Add null check to `CreateWheelScroll` --- dotnet/src/webdriver/Interactions/WheelInputDevice.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotnet/src/webdriver/Interactions/WheelInputDevice.cs b/dotnet/src/webdriver/Interactions/WheelInputDevice.cs index c3e049a290ee0..8d690ba4c7db6 100644 --- a/dotnet/src/webdriver/Interactions/WheelInputDevice.cs +++ b/dotnet/src/webdriver/Interactions/WheelInputDevice.cs @@ -89,8 +89,14 @@ public Interaction CreateWheelScroll(int deltaX, int deltaY, TimeSpan duration) /// The distance along the Y axis to scroll using the wheel. /// The duration of the scroll action. /// The representing the wheel scroll. + /// If is . public Interaction CreateWheelScroll(IWebElement target, int xOffset, int yOffset, int deltaX, int deltaY, TimeSpan duration) { + if (target is null) + { + throw new ArgumentNullException(nameof(target)); + } + return new WheelScrollInteraction(this, target, CoordinateOrigin.Element, xOffset, yOffset, deltaX, deltaY, duration); }