Skip to content

Commit

Permalink
Reword the introduction to fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Jan 19, 2024
1 parent c918227 commit 1b81268
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/page-objects/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ Fields
======

A field is a read-only property in a :ref:`page object class <page-objects>`
that is decorated with :meth:`@field <web_poet.fields.field>`, is named after a
key of the :ref:`item <items>` that the page object class returns, and returns
the value for that item key based on :ref:`inputs <inputs>`.
decorated with :meth:`@field <web_poet.fields.field>` instead of
:func:`@property <property>`.

Each field is named after a key of the :ref:`item <items>` that the page object
class returns. A field uses the :ref:`inputs <inputs>` of its page object class
to return the right value for the matching item key.

For example:

Expand Down

0 comments on commit 1b81268

Please sign in to comment.