Skip to content

Commit d1c8184

Browse files
committed
Remove superfluous check
1 parent a9184bf commit d1c8184

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Util/Locator.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,9 @@ public static function humanReadableString(WebDriverBy|array|string $selector):
338338
$locator = $selector[$type];
339339
return "{$type} '{$locator}'";
340340
}
341-
if (class_exists('\Facebook\WebDriver\WebDriverBy') && $selector instanceof WebDriverBy) {
342-
$type = $selector->getMechanism();
343-
$locator = $selector->getValue();
344-
return "{$type} '{$locator}'";
345-
}
346-
throw new InvalidArgumentException("Unrecognized selector");
341+
342+
$type = $selector->getMechanism();
343+
$locator = $selector->getValue();
344+
return "{$type} '{$locator}'";
347345
}
348346
}

0 commit comments

Comments
 (0)