You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Crawler.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -770,12 +770,12 @@ public function selectImage(string $value): static
770
770
}
771
771
772
772
/**
773
-
* Selects a button by name or alt value for images.
773
+
* Selects a button by its text content, id, value, name or alt attribute.
774
774
*/
775
775
publicfunctionselectButton(string$value): static
776
776
{
777
777
return$this->filterRelativeXPath(
778
-
sprintf('descendant-or-self::input[((contains(%1$s, "submit") or contains(%1$s, "button")) and contains(concat(\'\', normalize-space(string(@value)), \'\'), %2$s)) or (contains(%1$s, "image") and contains(concat(\'\', normalize-space(string(@alt)), \'\'), %2$s)) or @id=%3$s or @name=%3$s] | descendant-or-self::button[contains(concat(\'\', normalize-space(string(.)), \'\'), %2$s) or @id=%3$s or @name=%3$s]', 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")', static::xpathLiteral(''.$value.''), static::xpathLiteral($value))
778
+
sprintf('descendant-or-self::input[((contains(%1$s, "submit") or contains(%1$s, "button")) and contains(concat(\'\', normalize-space(string(@value)), \'\'), %2$s)) or (contains(%1$s, "image") and contains(concat(\'\', normalize-space(string(@alt)), \'\'), %2$s)) or @id=%3$s or @name=%3$s] | descendant-or-self::button[contains(concat(\'\', normalize-space(string(.)), \'\'), %2$s) or contains(concat(\'\', normalize-space(string(@value)), \'\'), %2$s) or @id=%3$s or @name=%3$s]', 'translate(@type, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")', static::xpathLiteral(''.$value.''), static::xpathLiteral($value))
0 commit comments