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

omniplay

v1.0.7

Published

A Playwright library for Salesforce Omnistudio automation

Downloads

15

Readme

Omniplay

A Playwright library for Salesforce Omnistudio automation.

Installation

To install the library, run:

npm install omniplay

Usage

OmniStudio Helpers

The omnistudioHelpers.ts module provides helper functions for OmniStudio interactions.

Example

import { Page } from '@playwright/test';
import { OmniStudioHelpers } from './omnistudioHelpers';

// Select from typeahead
await OmniStudioHelpers.selectFromTypeahead('typeahead-name', 'value', page, true);

Salesforce Helpers

The salesforceHelpers.ts module provides helper functions for Salesforce interactions.

Example

import { Page } from '@playwright/test';
import { SalesforceHelpers } from './salesforceHelpers';

// Navigate to a tab
await SalesforceHelpers.navigateToTab('tab-name', page);

// Click a button
await SalesforceHelpers.clickButton('button-name', page);

// Open an application
await SalesforceHelpers.openApplication('app-name', page, true);

Security Helpers

The securityHelpers.ts module provides helper functions for login operations.

Example

import { Page } from '@playwright/test';
import { SecurityHelpers } from './securityHelpers';

// Perform login
await SecurityHelpers.login(page, 'https://login.salesforce.com', 'username', 'password');

Safe Click Helpers

The clickHelpers.ts module includes functions to safely click on elements with retries and capture snapshots on failure.

Example

import { Page, Locator } from '@playwright/test';
import { safeClick, safeClickTypeahead, safeClickTypeaheadValue, safeClickAppLauncher, safeClickAppLauncherValue } from './clickHelpers';

// Safe click with retries
await safeClick(element, page, 'click_failure');

// Safe click for typeahead elements
await safeClickTypeahead(element, page);

// Safe click for specific value in typeahead
await safeClickTypeaheadValue(element, 'value', page);

// Safe click for app launcher
await safeClickAppLauncher(element, page);

// Safe click for specific value in app launcher
await safeClickAppLauncherValue(element, 'value', page, true);

Capturing Snapshots

The captureSnapshots.ts module provides functions to capture HTML snapshots and screenshots.

Example

import { Page } from '@playwright/test';
import { captureHtmlSnapshot, captureScreenshot, captureFailureSnapshotAndScreenshot } from './captureSnapshots';

// Capture HTML snapshot
await captureHtmlSnapshot(page, 'snapshot.html');

// Capture screenshot
await captureScreenshot(page, 'snapshot.png');

// Capture both HTML snapshot and screenshot on failure
await captureFailureSnapshotAndScreenshot(page, 'failure_snapshot');

Scripts

  • build: Compiles TypeScript to JavaScript
  • lint: Lints TypeScript files
  • format: Formats TypeScript files using Prettier
  • prepare: Runs build script

Contributing

Direct contributions are not accepted for this repository. To ensure consistency and maintain the quality of this library, all modifications are handled solely by the original author.

However, we value your feedback! If you have any bug reports or feature suggestions, please use the repository issues section. Your input is appreciated and will be considered for future updates.

License

This project is licensed under the MIT License. Redistribution is allowed, but modifications are not permitted.