Axinom Mosaic Libraries
    Preparing search index...

    A model for a FormElementContainer component with methods to apply a model of a specific field type.

    Hierarchy (View Summary)

    Index

    Constructors

    • A model for a FormField component.

      Parameters

      • parent: ComponentModel | Page | FrameLocator

        The parent playwright page, frame or component model.

      • Optionalxpath: string

        A relative xpath selector to this element from the parent.

      • Optionalnth: number

        Position among matching elements. Position is 1 indexed. Negative numbers count from the end.

      Returns UntypedFormField

    Properties

    as: <TField extends TypedFormField>(type: FieldConstructor<TField>) => TField

    This method applies a model to this field.

    asBooleanViewField: () => BooleanViewField

    This method applies a BooleanViewField model to this field.

    asCheckboxField: () => CheckboxField

    This method applies a CheckboxField model to this field.

    asCustomTagsField: () => CustomTagsField

    This method applies a CustomTagsField model to this field.

    asDateTimeField: () => DateTimeField

    This method applies a DateTimeField model to this field.

    asDynamicDataListField: () => DynamicDataListField

    This method applies a DynamicDataListField model to this field.

    asFileUploadField: () => FileUploadField

    This method applies a FileUploadField model to this field.

    asGenericField: () => GenericField

    This method applies a GenericField model to this field.

    asLinkField: () => LinkField

    This method applies a LinkField model to this field.

    asRadioField: () => RadioField

    This method applies a RadioField model to this field.

    asReadOnlyField: () => ReadOnlyField

    This method applies a ReadOnlyField model to this field.

    asReadOnlyTextField: () => ReadOnlyTextField

    This method applies a ReadOnlyTextField model to this field.

    asSelectField: () => SelectField

    This method applies a SelectField model to this field.

    asSingleLineTextField: () => SingleLineTextField

    This method applies a SingleLineTextField model to this field.

    asTagsField: () => TagsField

    This method applies a TagsField model to this field.

    asTextAreaField: () => TextAreaField

    This method applies a TextAreaField model to this field.

    asToggleButtonField: () => ToggleButtonField

    This method applies a ToggleButtonField model to this field.

    content: Locator

    A locator to the form field content.

    error: Locator

    A locator to the field error message.

    label: Locator

    A locator to the field label.

    root: Page | FrameLocator

    The root playwright entity from which to resolve this component model's xpath.

    xpath: string

    An absolute xpath to the DOM element that this component model represents.

    Methods

    • This method gets a child component model with a provided type. This is useful for modelling a page where the UI is composed in a custom manner.

      Type Parameters

      Parameters

      • model: ComponentModelType<TModel>

        A ComponentModel type. e.g. ToggleButton / Modal

      • Optionalxpath: string

        An optional xpath relative to this component. If not provided, the model's default xpath will be used.

      • Optionalnth: number

        Optional position among matches. Position is 1 indexed. Negative numbers count from the end.

      Returns TModel

    • A helper method to create global locators - This helps with locating globally across the entire DOM, rather than being scoped to the form

      Parameters

      • selector: string

      Returns Locator

    • This method gets a locator to the DOM element represented by this component model.

      Returns Locator

    • This method gets a locator to a DOM element relative to the element represented by this component model.

      Parameters

      • xpath: string

        An xpath relative to this component.

      • Optionalnth: number

        Optional position among matches. Position is 1 indexed. Negative numbers count from the end.

      Returns Locator