Socket
Socket
Sign inDemoInstall

@wdio/globals

Package Overview
Dependencies
2
Maintainers
3
Versions
218
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/globals


Version published
Weekly downloads
347K
decreased by-0.41%
Maintainers
3
Created
Weekly downloads
 

Package description

What is @wdio/globals?

@wdio/globals is a package that provides global variables and functions for WebdriverIO, a popular automation test framework. It simplifies the setup and usage of WebdriverIO by offering a set of globally accessible utilities.

What are @wdio/globals's main functionalities?

Global Browser Object

The global `browser` object allows you to interact with the browser instance directly. This includes navigating to URLs, interacting with elements, and more.

browser.url('https://example.com');

Global Expect Function

The global `expect` function is used for assertions in your tests. It allows you to make assertions about the state of the browser or elements within it.

expect(browser).toHaveTitle('Example Domain');

Global $ and $$ Functions

The global `$` and `$$` functions are shorthand for selecting single and multiple elements, respectively. They simplify the process of element selection in your tests.

const element = $('selector'); const elements = $$('selector');

Other packages similar to @wdio/globals

Readme

Source

WDIO Globals

A helper utility for importing global variables directly

This package can be used to import global variables explicitly, e.g.

import { browser, $, $$, expect } from '@wdio/globals'

describe('my test', () => {
    // ...

    it('can do something', async () => {
        // ...
    })

    // ...
})

For more information on WebdriverIO Globals, check out the docs.

Keywords

FAQs

Last updated on 15 Aug 2022

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc