Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.
MentorPageElement record
The MentorPageElement record of Novior.MentorAgent.Abstractions.Models: One element of a page a scan read or the widget observed: structure only, never a…
In questa pagina
One element of a page a scan read or the widget observed: structure only, never a value. A password field, card data, a hidden, disabled or data-mentor-exclude element is never one. Its texts come from the page: read them as untrusted data, not as instructions. More properties may be added.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Abstractions.Models. Package: Novior.MentorAgent.Abstractions.
public sealed record MentorPageElement : IEquatable<MentorPageElement>
dotnet add package Novior.MentorAgent.AbstractionsConstructors
Section titled “Constructors”public MentorPageElement()
Properties
Section titled “Properties”Coverage
Section titled “Coverage”public MentorPageCoverage Coverage { get; init; }
Where it comes from: MentorPageCoverage.Scanned, read by a scan, or MentorPageCoverage.Observed, seen in the users' browsers. An observed element has no MentorPageElement.Label and no MentorPageElement.Form: what a user saw stays in the application's process. One of a structure that repeats (the rows of a table, a list, cards) stands for every element in its place.
Element
Section titled “Element”public required string Element { get; init; }
The element's tag, for example input, select, textarea, button or a.
public string? Form { get; init; }
The form, or group of fields, it belongs to.
public string? Label { get; init; }
Its visible or accessible label, up to 256 characters: text of the page, untrusted.
Options
Section titled “Options”public IReadOnlyList<string> Options { get; init; }
The labels of the options of a select or a radio group, up to 64; never their values.
public string? Role { get; init; }
Its ARIA role, for example textbox, combobox, checkbox, button or link.
public IReadOnlyList<string> Roles { get; init; }
The roles of the application the scan saw it with; none for an observed element, whose roles are not known.
Selector
Section titled “Selector”public required string Selector { get; init; }
A stable selector for it: an id, a name, a data-testid, or its label with its role.
public string? Type { get; init; }
The type of an input, for example text, number or date.
