Skip to content

Installation ​

Package Manager ​

Install Acquiescence using your preferred package manager:

bash
npm install acquiescence
bash
yarn add acquiescence
bash
pnpm add acquiescence

Requirements ​

  • Node.js: Version 22.12 or higher, for development (building, testing, and building the documentation). The library itself runs in a browser, or in Node.js with jsdom.
  • Browser: Modern browsers with ES2022 support
    • Chrome/Edge 80+
    • Firefox 80+
    • Safari 14+

Import Options ​

ES Modules ​

typescript
import { ElementStateInspector } from 'acquiescence';

The package is ESM-only: it cannot be loaded with require().

Browser Bundle ​

If you need to use Acquiescence directly in a browser without a build step, you can use the browser bundle:

html
<script src="node_modules/acquiescence/dist/acquiescence.browser.js"></script>
<script>
  const inspector = new Acquiescence.ElementStateInspector();
</script>

Every export is a property of the Acquiescence global: ElementStateInspector, AriaSnapshotGenerator, AriaSnapshotMatcher, DomSnapshotGenerator, ElementDescriber, ActionRecorder, TimeoutWaiter, and RequestAnimationFrameWaiter.

TypeScript Support ​

Acquiescence is written in TypeScript and includes type definitions out of the box. No additional @types packages are needed.

typescript
import { 
  ElementStateInspector,
  ElementState,
  ElementInteractionType,
  TimeoutWaiter
} from 'acquiescence';

// Full type safety and IntelliSense support
const inspector: ElementStateInspector = new ElementStateInspector();

Verify Installation ​

Create a simple test to verify the installation:

typescript
import { ElementStateInspector } from 'acquiescence';

const inspector = new ElementStateInspector();
const element = document.body;

inspector.queryElementState(element, 'visible').then(result => {
  console.log('Installation successful!', result);
});

Next Steps ​

Released under the Apache License 2.0.