npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@peernett/auto-qa

v0.5.3

Published

AutoWM Web application automation framework

Downloads

5

Readme

Auto-QA

Auto-QA is a powerful automated testing tool that simplifies the process of testing web applications. It provides a set of utilities and functions to execute various testing actions, interact with web pages, and validate results.

Installation

To use Auto-QA in your project, you need to have Node.js installed. Then, you can install Auto-QA using npm:

npm install @peernett/auto-qa


Usage:
Auto-QA can be used programmatically in your JavaScript/TypeScript code. Here's an example of how to use Auto-QA to perform a basic automated test:

import {client,closeBrowser,newClient,} from "./lib/execute.devtool";
import DOMContentLoaded,convertToXPath, waitFor} from "./lib/helpers/action.builder";
import {click,fetchAtt,go,press,type} from "./lib/helpers/functions.beutifier";
import { sessionId } from "./lib/start.session";

export let page: any;

// Chrome settings
export const chromeArgs = [
  "--disable-gpu", // Disable GPU acceleration
  "--disable-infobars", // Disable the "Chrome is being controlled by automated test software" infobar
  // "--headless", // Run Chrome in headless mode (commented out for visibility during automation)
  // "--no-sandbox", // Disable sandboxing for easier setup
  "--window-size=2540,1440",
  "--start-maximized",
  "--remote-debugging-port=9222", // Specify the remote debugging port for CDP
];

// Browser Settings
export const automationArgs = {
  width: 2540, // viewport width
  height: 1440, // viewport height
  deviceScaleFactor: 1,
  mobile: false,
};

export const isMaximized = true; // maximized?

export async function test() {
  page = await newClient();
  await go("https://www.terminalx.com/");
  await click(
    '//*[@id="app-root"]/div[2]/main/div[2]/div/div/div/div/div[3]/div/a[2]',
    1500,
    600
  );
  await waitFor(900);
  await click(
    '//*[@id="app-root"]/div[2]/header/div/div[4]/nav/ul/li[1]/button',
    1500,
    600
  );
  await waitFor(900);
  console.log(convertToXPath([".input_sILM"]));
  await press(
    "Enter",
    await type(
      '//*[@id="app-root"]/div[2]/header/div[2]/div[4]/nav/ul/li[1]/div/form/input',
      "hello",
      5000,
      300
    )
  );
  await waitFor(900);
  await fetchAtt(
    '//*[@id="app-root"]/div[2]/header/div/div[2]/div[1]/div[1]/div/div/div/a/div',
    ["outerHTML", "innerHTML", "textContent"],
    3000,
    300
  );
}


This example incorporates the provided index.ts code into the README file, demonstrating how to import and use the functions and variables from the auto-qa package.

Feel free to modify and expand upon this template according to your project's specific needs.