New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@alexkamaev/testcafe-browser-tools

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alexkamaev/testcafe-browser-tools

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

  • 2.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

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'

Note that the application for a particular platform must be built on a machine with the same platform.

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)

FAQs

Package last updated on 25 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc