Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit 9f4b7c3

Browse files
committed
WebDriverNotConstraint can receive non-string selecters on 2.5
1 parent 2165441 commit 9f4b7c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/Constraint/WebDriverNot.php

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ protected function matches($nodes) : bool
1313

1414
protected function fail($nodes, $selector, ComparisonFailure $comparisonFailure = null) : void
1515
{
16+
if (!is_string($selector) || strpos($selector, "'") === false) {
17+
$selector = Locator::humanReadableString($selector);
18+
}
1619
if (!$this->string) {
1720
throw new \PHPUnit\Framework\ExpectationFailedException(
1821
"Element $selector was found",

0 commit comments

Comments
 (0)