Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wdio/protocols

Package Overview
Dependencies
Maintainers
3
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/protocols

Utility package providing information about automation protocols

  • 8.0.0-alpha.328
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is @wdio/protocols?

@wdio/protocols is a package that provides WebDriver and Appium protocol bindings for the WebdriverIO framework. It allows you to interact with browser and mobile automation protocols, enabling you to perform a wide range of automation tasks.

What are @wdio/protocols's main functionalities?

WebDriver Protocol

This feature allows you to interact with the WebDriver protocol to automate browser actions. The code sample demonstrates how to initialize a WebDriver session, navigate to a URL, get the page title, and then close the session.

const { WebDriverProtocol } = require('@wdio/protocols');

const session = new WebDriverProtocol({
  hostname: 'localhost',
  port: 4444,
  path: '/wd/hub'
});

session.init({
  capabilities: {
    browserName: 'chrome'
  }
}).then(() => {
  return session.url('https://example.com');
}).then(() => {
  return session.getTitle();
}).then(title => {
  console.log('Page title is:', title);
  return session.deleteSession();
}).catch(err => {
  console.error('Error:', err);
});

Appium Protocol

This feature allows you to interact with the Appium protocol to automate mobile app actions. The code sample demonstrates how to initialize an Appium session, navigate to a URL within the app, get the app title, and then close the session.

const { AppiumProtocol } = require('@wdio/protocols');

const session = new AppiumProtocol({
  hostname: 'localhost',
  port: 4723,
  path: '/wd/hub'
});

session.init({
  capabilities: {
    platformName: 'Android',
    deviceName: 'emulator-5554',
    app: '/path/to/app.apk'
  }
}).then(() => {
  return session.url('https://example.com');
}).then(() => {
  return session.getTitle();
}).then(title => {
  console.log('App title is:', title);
  return session.deleteSession();
}).catch(err => {
  console.error('Error:', err);
});

Other packages similar to @wdio/protocols

Keywords

FAQs

Package last updated on 08 Sep 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc