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

testcafe-browser-tools

v2.0.26

Published

An utility library for performing platform-dependent actions on browsers.

Downloads

912,681

Readme

testcafe-browser-tools

Build Status

TestСafe Browser Tools is an utility library for performing platform-dependent actions on browser windows. Working with browsers is specific for each operating system and requires native code to deal with. In order to provide painless and simple installation, this package encapsulates pre-built binaries for all supported platforms and JS-wrappers around them. This helps end-users avoid running post-npm-install build actions.  

Build Process

To build native binaries from source files, execute the gulp task corresponding to your operating system:

'buildWin'
'buildMac'
'buildLinux'

Important note: The application for a particular platform must be built on a machine with the same platform. Since this package can be used on old OS version such as NodeJS 16 docker container, it is important to build binaries on the old OS version for the binaries to contain corresponding dependencies(for example glibc-2.31 for node16 docker image).

The bin directory contains pre-built native binaries. Consider using them if your contribution does not affect the native modules.

Install

$ npm install testcafe-browser-tools

API Reference

Important note: To identify the web browser window, most of the provided functions use its title. This title matches the web page's document.title in most of the browsers. However, Microsoft Edge truncates the window title to the hostname if document.title contains only a URL ( e.g. document.title = 'http://localhost:1337/page' gives localhost in the window title).

So, you need to add some characters before the URL in order to bring it to the window title:

document.title = 'title: ' + document.location.toString()

For API reference, see the API document.

Testing

To run automated tests:

$ npm test

Since the module functionality depends on browsers available on a testing machine and you cannot predict expected returned values for some functions, the automated tests cover only a part of the functionality. To test all the functions provided by the module, use the playground. To run it, execute the gulp task corresponding to your operating system:

$ gulp runPlaygroundWin
$ gulp runPlaygroundMac
$ gulp runPlaygroundLinux

This will open the Playground web page at http://localhost:1334/, where you can manually check if the functions work correctly.

Author

Developer Express Inc.(http://devexpress.com)