Skip to content

Commit 991383a

Browse files
committed
fix whitespace
1 parent b8eac10 commit 991383a

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

dotnet/src/webdriver/Interactions/WheelInputDevice.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,28 +205,28 @@ public override Dictionary<string, object> ToDictionary()
205205
return toReturn;
206206
}
207207

208-
private Dictionary<string, object> ConvertElement()
208+
private Dictionary<string, object> ConvertElement()
209+
{
210+
IWebDriverObjectReference? elementReference = this.target as IWebDriverObjectReference;
211+
if (elementReference == null)
209212
{
210-
IWebDriverObjectReference? elementReference = this.target as IWebDriverObjectReference;
211-
if (elementReference == null)
213+
IWrapsElement? elementWrapper = this.target as IWrapsElement;
214+
while (elementWrapper != null)
212215
{
213-
IWrapsElement? elementWrapper = this.target as IWrapsElement;
214-
while (elementWrapper != null)
216+
elementReference = elementWrapper.WrappedElement as IWebDriverObjectReference;
217+
if (ReferenceEquals(elementWrapper, elementWrapper.WrappedElement))
215218
{
216-
elementReference = elementWrapper.WrappedElement as IWebDriverObjectReference;
217-
if (ReferenceEquals(elementWrapper, elementWrapper.WrappedElement))
218-
{
219-
throw new InvalidOperationException("Cannot determine root element: element wrapper wraps itself");
220-
}
221-
222-
elementWrapper = elementWrapper.WrappedElement as IWrapsElement;
219+
throw new InvalidOperationException("Cannot determine root element: element wrapper wraps itself");
223220
}
224-
}
225221

226-
if (elementReference == null)
227-
{
228-
throw new ArgumentException($"Target element cannot be converted to {nameof(IWebDriverObjectReference)}");
222+
elementWrapper = elementWrapper.WrappedElement as IWrapsElement;
229223
}
224+
}
225+
226+
if (elementReference == null)
227+
{
228+
throw new ArgumentException($"Target element cannot be converted to {nameof(IWebDriverObjectReference)}");
229+
}
230230

231231
Dictionary<string, object> elementDictionary = elementReference.ToDictionary();
232232
return elementDictionary;

0 commit comments

Comments
 (0)