MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / ByClassName

Method ByClassName

java/src/org/openqa/selenium/By.java:304–316  ·  view source on GitHub ↗
(String className)

Source from the content-addressed store, hash-verified

302 private final String className;
303
304 public ByClassName(String className) {
305 super(
306 "class name",
307 Require.argument("Class name", className)
308 .nonNull("Cannot find elements when the class name expression is null."),
309 ".%s");
310
311 if (AT_LEAST_ONE_WHITESPACE.matcher(className).matches()) {
312 throw new InvalidSelectorException("Compound class names not permitted");
313 }
314
315 this.className = className;
316 }
317
318 @Override
319 public String toString() {

Callers

nothing calls this directly

Calls 3

argumentMethod · 0.95
matchesMethod · 0.65
nonNullMethod · 0.45

Tested by

no test coverage detected