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

@bbc/nightwatch-commands

Package Overview
Dependencies
Maintainers
28
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/nightwatch-commands - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

commands/dontRunOn.js

2

package.json
{
"name": "@bbc/nightwatch-commands",
"version": "1.0.2",
"version": "1.0.3",
"description": "Basic Nightwatch Commands",

@@ -5,0 +5,0 @@ "license": "MIT",

# Keywords
* [dontRunOn](#dontrunon)
* [elementCount](#elementcount)

@@ -9,2 +10,45 @@ * [getVersionNumbers](#getversionnumbers)

## dontRunOn
### Purpose
Add the ability to exit a test early if we do not want to run on a specific environment
### Parameters
The ```dontRunOn(['environment'])``` keyword accepts an array of environments such as ```int```,```test``` or ```live```.
### How it works
It compares the array to the current environment it is testing against (Usually provided by the ```ENV``` variable in the ```.env``` file)
### Example
```
browser.page.<page>.dontRunOn(['live']);
```
## elementCount
### Purpose
Read the number of elements that match a certain criteria
### Parameters
* The ```elementCount(locateStrategy, selector, count)``` keyword has three required parameters:
* ```locateStrategy``` - can be something like ```css selector``` or ```xpath``` and is based on the selector
* ```selector``` - is way in which we identify the element
* ```count``` - is the number of items that we are expecting there to be
### How it works
It checks the number of elements which match the selector and if it does not match the count given then it will fail the assertion.
### Example
```
browser.page.<page>.assert.elementCount('css selector', 'ol li', 7);
```
## getVersionNumbers

@@ -11,0 +55,0 @@

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