A rendered page, ready to be asked questions.
The accessors know GOV.UK and HMRC markup, so a page from another design system is still readable through css, byId, byRole and doc.
Value parameters
- document
-
the parsed markup, repaired where the parser had to
- lang
-
the language the page was rendered in
- messages
-
the messages for that language, used to resolve message keys
- parseErrors
-
what the parser had to repair, up to fifty entries
- source
-
the markup as rendered, before any repair
Attributes
- Companion
- object
- Source
- Page.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
The description an assistive technology reads after the name.
The name an assistive technology would announce for an element.
The GOV.UK accordions.
The HMRC add-to-a-list components.
govukBackLink renders .govuk-back-link; services that set their own id use back or back-link.
govukBackLink renders .govuk-back-link; services that set their own id use back or back-link.
Attributes
- Source
- Page.scala
The GOV.UK breadcrumbs.
The GOV.UK bullet lists.
Every button and submit input.
The element with this id, matched by attribute rather than CSS syntax, so an id with a dot in it works.
The element with this id, matched by attribute rather than CSS syntax, so an id with a dot in it works.
Attributes
- Source
- Page.scala
Elements with this ARIA role, implicit or explicit.
Elements with this role whose accessible name matches.
The GOV.UK caption above a heading, in any of its sizes.
The checkboxes sharing this name.
Whether the page's visible text contains this, after normalisation.
Count this page's assertions together with those on every other page this spec covers under the same name — the states of one view, say, so that what was asserted on the page with errors counts for the page without:
Count this page's assertions together with those on every other page this spec covers under the same name — the states of one view, say, so that what was asserted on the page with errors counts for the page without:
render(view(form)).coveredAs("name-page")
render(view(formWithErrors)).coveredAs("name-page")
Without it, a page is grouped with the renders that produce exactly its markup. Only a page a spec rendered can share a record; one built directly keeps its own.
Attributes
- Source
- Page.scala
Every element matching this CSS selector.
The fields of a date input, under either id convention.
The details components, GOV.UK or plain.
Escape hatch: raw Jsoup.
Every inline error message.
The GOV.UK error summary.
The error summary entries whose link lands on nothing: a link to #firstName when the input is id="value" leaves a keyboard user stranded.
The error summary entries whose link lands on nothing: a link to #firstName when the input is id="value" leaves a keyboard user stranded.
Attributes
- Source
- Page.scala
(href target without the leading '#', link text) for each error summary entry.
(href target without the leading '#', link text) for each error summary entry.
Attributes
- Source
- Page.scala
The heading of the error summary.
Inline error text keyed by the field it belongs to, with the visually hidden "Error:" prefix stripped.
Inline error text keyed by the field it belongs to, with the visually hidden "Error:" prefix stripped.
Attributes
- Source
- Page.scala
Every fieldset.
The file inputs with this name or id.
The action of the first form, if there is one.
Any control by name or id: input, select or textarea.
Every control on the page that a user can type into or choose from.
The method of the first form, upper-cased, if there is one.
What the page's forms would submit as their markup stands — before any script runs or anyone types — as name and value pairs in document order.
What the page's forms would submit as their markup stands — before any script runs or anyone types — as name and value pairs in document order.
It is a static reading of the markup, not a submission: every form on the page is read together, and no button is the submitter, so no button's name is included. Within that, it follows the browser. A checkbox counts only when it is checked, and says on when it has no value; of several radios marked checked in one group, only the last is, as checking one unchecks the rest. A select sends its selected options, and a single select with none marked sends the first option that is not disabled, which is what a browser shows as chosen. A textarea sends its text as written, and a file input an empty file name, since markup cannot choose a file. A disabled control sends nothing, and neither do buttons, reset controls or image inputs. A name can appear more than once, as a group of checkboxes does. On a whole page, a control no form owns sends nothing, as in a browser, so a field left outside its form shows; on a fragment every control counts, since its form may be in the template that includes it.
Attributes
- Source
- Page.scala
The value each name submits: formSubmission as a map, keeping the last value for a name that is submitted more than once.
The value each name submits: formSubmission as a map, keeping the last value for a name that is submitted more than once.
Attributes
- Source
- Page.scala
Every form on the page.
The = elements; a page should have exactly one.
Every heading with its level, in document order.
The hint for this field, by the GOV.UK id convention or inside the field's wrapper.
The hint for this field, by the GOV.UK id convention or inside the field's wrapper.
Attributes
- Source
- Page.scala
Every GOV.UK hint.
The lang attribute of the `` element, if it has one.
Every image.
The inputs with this name or id.
The GOV.UK inset text blocks.
Disabled as a browser sees it: on the control, or inherited from a disabled fieldset — except inside that fieldset's first legend, which HTML leaves enabled so a legend can hold the control that switches the rest on.
Disabled as a browser sees it: on the control, or inherited from a disabled fieldset — except inside that fieldset's first legend, which HTML leaves enabled so a legend can hold the control that switches the rest on.
Attributes
- Source
- Page.scala
The labels pointing at this field.
A switcher offers another language, so a link declaring the one it is already in does not count — a "report a technical issue" link carrying hreflang="en" on an English page is not a toggle.
A switcher offers another language, so a link declaring the one it is already in does not count — a "report a technical issue" link carrying hreflang="en" on an English page is not a toggle.
Attributes
- Source
- Page.scala
Every legend.
Every link with a destination.
The main content landmark.
Resolve a message key in this page's language. A key the language does not define resolves to nothing, rather than to the English Play would render in its place, so a Welsh assertion cannot pass on English words.
Resolve a message key in this page's language. A key the language does not define resolves to nothing, rather than to the English Play would render in its place, so a Welsh assertion cannot pass on English words.
Attributes
- Source
- Page.scala
Resolve a key, falling back to the key itself (Play's default behaviour).
Resolve a key, falling back to the key itself (Play's default behaviour).
Attributes
- Source
- Page.scala
Every element matching this selector, under a name used in failure messages.
Every element matching this selector, under a name used in failure messages.
Attributes
- Source
- Page.scala
The GOV.UK notification banners.
The GOV.UK numbered lists.
Building this touches most of the page, and a failure message is not an assertion, so it must not count as coverage.
Building this touches most of the page, and a failure message is not an assertion, so it must not count as coverage.
Attributes
- Source
- Page.scala
The GOV.UK or HMRC pagination.
The GOV.UK panels.
The paragraphs of body text.
The alpha or beta phase banner.
Position in document order, for asserting one thing comes before another.
Position in document order, for asserting one thing comes before another.
Attributes
- Source
- Page.scala
The radio buttons sharing this name.
The selects with this name or id.
The service name in a GOV.UK or HMRC header.
The sign out link of an HMRC header.
The control that submits the form, chosen among those that can submit one: a button whose type is submit, missing or one HTML does not know, a submit input or an image input. The one with the id submit comes first, then those inside a form, then any.
The control that submits the form, chosen among those that can submit one: a button whose type is submit, missing or one HTML does not know, a submit input or an image input. The one with the id submit comes first, then those inside a form, then any.
Attributes
- Source
- Page.scala
Every GOV.UK summary list.
Summary list rows as (key, value, action texts).
Every table.
The GOV.UK tabs.
The GOV.UK tags.
The page's visible text, normalised: its body, and not the ``, which is shown in a browser's tab rather than on the page.
The page's visible text, normalised: its body, and not the ``, which is shown in a browser's tab rather than on the page.
Attributes
- Source
- Page.scala
The textareas with this name or id.
The HMRC session timeout dialog.
The browser title, normalised.
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
- Source
- Page.scala
The text of the GOV.UK warning callouts.
The same page, read in another language. It is the same page for coverage too: what is asserted on either counts for both.
The same page, read in another language. It is the same page for coverage too: what is asserted on either counts for both.
Attributes
- Source
- Page.scala
Concrete fields
Attributes
- Source
- Page.scala
Attributes
- Source
- Page.scala
Attributes
- Source
- Page.scala
Attributes
- Source
- Page.scala
Attributes
- Source
- Page.scala