Variable AccordionConst

Accordion: any = AccordionInteractor

Call this InteractorConstructor to initialize a accordion Interactor. The accordion interactor can be used to interact with accordions on the page and to assert on their state.

The accordion is located by the aria-label attribute or visible text on the accordion's summary in otherwise.

await Accordion('Overview').toggle();
await Accordion('Overview').is({ expanded: true });
await Accordion({ id: 'overview-accordion', disabled: true }).exists();
  • title: string – Filter by title
  • id: string – Filter by id
  • visible: boolean – Filter by visibility. Defaults to true. See isVisible.
  • disabled: boolean – Filter by whether the accordion is disabled. Defaults to false.
  • expanded: boolean – Filter by whether the accordion is expanded.
  • expand(): Interaction – Expand the accordion
  • collapse(): Interaction – Collapse the accordion
  • toggle(): Interaction – Toggle the accordion