Skip to content

Commit d40b1a8

Browse files
authored
switch ByClassName locator from to "class name" (#10355)
"class" is not compatible with ios-driver, Refer to line 39 in https://github.com/ios-driver/ios-driver/blob/dev/server/src/main/java/org/uiautomation/ios/command/web/ToCSSSelectorConverter.java. the "class" does not match any if condition here and will finally throw "WebDriverException: NI , selector type class" If switch "class" to "class name", it works for both ios-driver, chromium-driver and geckodirver. Co-authored-by: Puja Jagani <[email protected]> Co-authored-by: Diego Molina <[email protected]> [skip ci]
1 parent f333a04 commit d40b1a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • java/src/org/openqa/selenium

java/src/org/openqa/selenium/By.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public static class ByClassName extends PreW3CLocator {
301301

302302
public ByClassName(String className) {
303303
super(
304-
"class",
304+
"class name",
305305
Require.argument("Class name", className)
306306
.nonNull("Cannot find elements when the class name expression is null."),
307307
".%s");

0 commit comments

Comments
 (0)