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

quest-global

v2.5.31

Published

Package of global methods to be used by Quest Diagnostics to abstract specific tools

Downloads

71

Readme

cp-file

Quest Global Automation Framework method library

Highlights

  • Abstraction layer for a protractor/selenium UI automation framework
  • User-friendly interface to interact with webElements
  • Send and retrieve from an ahem email server
  • log method with timestamp

Install

$ npm install quest-global

Usage


import * as globalMethods from 'quest-global';

globalMethods.log("Welcome to the quest-global README");

API

clearText(element: ElementFinder, elementName: string, timeout: number): Promise

@param element — element to clear text from @param logString — element name to log to console @param timeout — max amount of time to wait for element to appear on page

Clears text from a textfield

click(element: ElementFinder, elementName: String, timeout: number): Promise

@param element — element to click @param elementName — element name for logger statement @param timeout — max amount of time to wait before clicking element

Clicks an element

closeTab(): Promise

Closes current tab

enterAndSelectFromAutoSuggest(ele: ElementFinder, item: string, timeout: number): Promise

@param element — element select value from @param item — value to select @param timeout — maximum amount of time to wait before selecting value

Selects option from dropdown

executeScriptClick(element: ElementFinder, elementName: String, timeout: number): Promise

@param element @param elementName @param timeout

Clicks element via JavaScript

executeScriptScrollIntoView(element: ElementFinder): Promise

@param element @param elementName @param timeout

Brings element into view

getAttribute(attributeName: string, entityName: string, schema: string, dataSource: string): {

attributeName: string; entityName: string; schema: string; dataSource: string;

Builds attributes object for tdm tool

getConfigBrowserSize(): any

Gets the viewport size from the processed config file

getData(domain: string, path: string, parameter: string): string

@param domain — url domain @param path — path to append to domain @param parameter — parameter to append to path and domain

Performs a Rest GET and return response text object at index 0. Used to connect to internal datamanagement endpoint

getDate(numDaysOffset: number, dateFormat: String): string

@param numDaysOffset — positive number will return # days in future, negative number will return # days in past @param dateFormat

getElementByAttribute(tagName: String, attributeName: String, attributeValue: String): ElementFinder

@param tagName — HTML Object tag (i.e. button, input, a, div, etc) @param attributeName — Custom attribute name (i.e. data-ta) @param attributeValue — Custom attribute value

function getElementByButtonText(buttonText: string): ElementFinder

Search the DOM for the text

getElementByClassName(className: string): ElementFinder

getElementByCss(css: string): ElementFinder

getElementByCssContainingText(css: string, text: string): ElementFinder

getElementById(id: string): ElementFinder

getElementById(id: string): ElementFinder

getElementById(id: string): ElementFinder

getElementByName(name: string): ElementFinder

getElementByXpath(Xpath: string): ElementFinder

procGetEmailData(url: string, mailboxName: string, jsonKey: string): Promise

@param url @param mailboxName @param jsonKey

Gets the json value for the inputted key, for the given mailbox (Ahem Email Server)

procGetSubjectline(url: string, mailboxName: string): Promise

Gets the subject line from an email on the Ahem email server

function procGetVerificationCode(url: string, mailboxName: string): Promise

@param mailboxName

Authenticates, and gets email and corresponding verification code

selectFromDropDown(ele: ElementFinder, item: string, timeout: number): Promise

@param element — element select value from @param item — value to select @param timeout — maximum amount of time to wait before selecting value

Selects option from dropdown

sendKeys(element: ElementFinder, text: string, timeout: number, clearPreviousText: boolean): Promise

@param element @param elementName @param timeout

Sends keys to an element, without first clearing text

switchTabs(tabIndex: number): Promise

@param tabIndex — index of tab to switch to

Switches to tab with inputted index

switchToFrame(xpath: string): Promise

@param xpath

Switches focus to frame, based on xpath input

textContains(text1: string, text2: string): Promise

@param text1 — first piece of text to compare @param text2 — second piece of text to compare @param presence — determines whether verification is of text equal/not equal

Returns boolean value of whether text equal/not equal to comparison text

verifyElement(element: ElementFinder, timeout: number, presence: boolean): Promise

verifyFailOnError(actual: any, expected: any, failStr: string, match: boolean): Promise

@param actual @param expected @param failStr

verifyText(text1: string, text2: string, presence: boolean): Promise

@param text1 — first piece of text to compare @param text2 — second piece of text to compare @param presence — determines whether verification is of text equal/not equal

Verifies text equal/not equal to comparison text

verifyTextContains(text1: string, text2: string, presence: boolean): Promise

@param text1 — first piece of text to compare @param text2 — second piece of text to compare @param presence — determines whether verification is of text equal/not equal

Verifies text equal/not equal to comparison text

waitForClickable(ele: ElementFinder, timeout: number): Promise

@param ele @param timeout

Waits for element to be clickable, up to specified number of seconds

function waitForElement(element: ElementFinder, presence: boolean, timeout: number): Promise

@param element @param presence @param timeout — Return Value: true/false

Waits for element presence/absence for up to timeout (parameter) Sample syntax var retVal = await waitForElement (element, presence, timeout_In_Milliseconds);

waitForElementScrollIntoView(element: ElementFinder, presence: boolean, timeout: number): Promise

waitForVisible(ele: ElementFinder, timeout: number): Promise

@param ele @param timeout

Waits for element to be visible, up to specified number of seconds

waitForVisible(ele: ElementFinder, timeout: number): Promise

Waits for element to be visible, up to specified number of seconds

@param ele @param timeout

Notes