Code Monkey home page Code Monkey logo

auto-vo's Introduction

auto-VO

Automate VoiceOver for testing web applications.

Setup

Installation

$ npm install -g auto-vo

Setup

  1. Open VoiceOver Utility and check "Allow VoiceOver to be controller with AppleScript".
  2. Enable Terminal app in System Preferences > Security & Privacy > Privacy > Accessibility.
  3. Accept Terminal VoiceOver automation permissions when prompted. (You can manage these later in System Preferences > Security & Privacy > Privacy > Automation).
  4. Optional: disable Dication shortcut under System Preferences > Keyboard > Dictation.

Screen Shot of automation preferences

Screen Shot of VoiceOver Utility general pane

Usage

CLI

Running the cli outputs the phrases spoken by the screen reader to stdout.

$ npx auto-vo --url https://example.com --limit 5 --until 'Example'

--url URL - where URL is the url to test

--limit n - where n is the maximum number of cursor moves

--until s - where s is a search term, after which the script ends. supercedes --limit.

--quiet - do not print to stdout

Node Module

$ npm install --save-dev auto-vo
import { run } from 'auto-vo';

(async function() {
    const options = { url: "https://www.example.com", limit: 10, until: 'Example' };

    const announcements = await run(options);

    console.log(announcements);
})();

Example Test Runner

Using mocha/chai:

import { run } from 'auto-vo';
import { expect } from 'chai';

describe('loading example.com', async () => {
  it('returns announcements', async () => {
    const options = { url: "https://www.example.com", limit: 10, until: 'Example', quiet: true };

    const announcements = await run(options);

    expect(announcements).to.include.members(["Example Domain web content"]);
  }).timeout(5000);
});

auto-vo's People

Contributors

ckundo avatar stephenmathieson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.