Skip to content

Commit

Permalink
Removing client-side check for whitespace in finding by class name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jimevans committed Jan 22, 2016
1 parent afea9f5 commit 19f5284
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions dotnet/src/webdriver/By.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,6 @@ public static By ClassName(string classNameToFind)
throw new ArgumentNullException("classNameToFind", "Cannot find elements when the class name expression is null.");
}

if (new Regex(".*\\s+.*").IsMatch(classNameToFind))
{
throw new IllegalLocatorException("Compound class names are not supported. Consider searching for one class name and filtering the results.");
}

By by = new By();
by.findElementMethod =
(ISearchContext context) => ((IFindsByClassName)context).FindElementByClassName(classNameToFind);
Expand Down

0 comments on commit 19f5284

Please sign in to comment.