Skip to content

Commit 19f5284

Browse files
committed
Removing client-side check for whitespace in finding by class name
This check is handled by the atoms, and will throw the proper error. There is no need to check this on the local end, and will ensure consistent behavior between language bindings.
1 parent afea9f5 commit 19f5284

File tree

1 file changed

+0
-5
lines changed
  • dotnet/src/webdriver

1 file changed

+0
-5
lines changed

dotnet/src/webdriver/By.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,6 @@ public static By ClassName(string classNameToFind)
221221
throw new ArgumentNullException("classNameToFind", "Cannot find elements when the class name expression is null.");
222222
}
223223

224-
if (new Regex(".*\\s+.*").IsMatch(classNameToFind))
225-
{
226-
throw new IllegalLocatorException("Compound class names are not supported. Consider searching for one class name and filtering the results.");
227-
}
228-
229224
By by = new By();
230225
by.findElementMethod =
231226
(ISearchContext context) => ((IFindsByClassName)context).FindElementByClassName(classNameToFind);

0 commit comments

Comments
 (0)