We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e0e092 commit 1d9c1b1Copy full SHA for 1d9c1b1
dotnet/src/webdriver/RelativeBy.cs
@@ -33,7 +33,7 @@ public class RelativeBy : By
33
{
34
private readonly string wrappedAtom;
35
private readonly object root;
36
- private readonly List<object> filters;
+ private readonly List<object> filters = new List<object>();
37
38
private static string GetWrappedAtom()
39
@@ -53,7 +53,10 @@ private RelativeBy(object root, List<object>? filters = null)
53
54
this.wrappedAtom = GetWrappedAtom();
55
this.root = GetSerializableRoot(root);
56
- this.filters = filters is null ? [] : [.. filters]; // Clone filters
+ if (filters != null)
57
+ {
58
+ this.filters.AddRange(filters);
59
+ }
60
}
61
62
/// <summary>
0 commit comments