Skip to content

fix #310430: DomCrawler component selectButton() docs update #10449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,13 @@ Forms
~~~~~

Special treatment is also given to forms. A ``selectButton()`` method is
available on the Crawler which returns another Crawler that matches a button
(``input[type=submit]``, ``input[type=image]``, or a ``button``) with the
given text. This method is especially useful because you can use it to return
available on the Crawler which returns another Crawler that matches ``<button>``
or ``<input type="submit">`` or ``<input type="button">`` elements (or an
``<img>`` element inside them). The string given as argument is looked for in
the ``id``, ``alt``, ``name``, and ``value`` attributes and the text content of
those elements.

This method is especially useful because you can use it to return
a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
form that the button lives in::

Expand Down