Skip to content

Commit 3330aa9

Browse files
committed
minor #10449 fix #310430: DomCrawler component selectButton() docs update (e-moe, javiereguiluz)
This PR was merged into the 2.8 branch. Discussion ---------- fix #310430: DomCrawler component selectButton() docs update fixes #10430 DomCrawler component and Symfony Testing docs contradict each other Commits ------- a910f52 Reword 3a0050a fix #310430: DomCrawler component selectButton() docs update
2 parents c8094e2 + a910f52 commit 3330aa9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

components/dom_crawler.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,13 @@ Forms
324324
~~~~~
325325

326326
Special treatment is also given to forms. A ``selectButton()`` method is
327-
available on the Crawler which returns another Crawler that matches a button
328-
(``input[type=submit]``, ``input[type=image]``, or a ``button``) with the
329-
given text. This method is especially useful because you can use it to return
327+
available on the Crawler which returns another Crawler that matches ``<button>``
328+
or ``<input type="submit">`` or ``<input type="button">`` elements (or an
329+
``<img>`` element inside them). The string given as argument is looked for in
330+
the ``id``, ``alt``, ``name``, and ``value`` attributes and the text content of
331+
those elements.
332+
333+
This method is especially useful because you can use it to return
330334
a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
331335
form that the button lives in::
332336

0 commit comments

Comments
 (0)