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

appium

Package Overview
Dependencies
Maintainers
8
Versions
439
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium

Automation for Apps.

2.17.1
latest
Source
npm
Version published
Weekly downloads
391K
6.07%
Maintainers
8
Weekly downloads
 
Created

What is appium?

Appium is an open-source tool for automating mobile, web, and hybrid applications on iOS, Android, and Windows platforms. It allows you to write tests using the WebDriver protocol and supports multiple programming languages such as Java, JavaScript, Python, and more.

What are appium's main functionalities?

Automate Mobile Applications

This code demonstrates how to automate an Android mobile application using Appium. It initializes a WebDriver client with the necessary capabilities and performs a click action on an element identified by its accessibility ID.

const wdio = require('webdriverio');
const opts = {
  port: 4723,
  capabilities: {
    platformName: 'Android',
    platformVersion: '9',
    deviceName: 'emulator-5554',
    app: '/path/to/the/app.apk',
    automationName: 'UiAutomator2'
  }
};
(async () => {
  const client = await wdio.remote(opts);
  await client.init();
  await client.elementByAccessibilityId('SomeElement').click();
  await client.quit();
})();

Automate Web Applications on Mobile Browsers

This code demonstrates how to automate a web application on a mobile browser using Appium. It initializes a WebDriver client with the necessary capabilities for a Chrome browser on an Android emulator, navigates to a URL, and retrieves the page title.

const wdio = require('webdriverio');
const opts = {
  port: 4723,
  capabilities: {
    platformName: 'Android',
    platformVersion: '9',
    deviceName: 'emulator-5554',
    browserName: 'Chrome',
    automationName: 'UiAutomator2'
  }
};
(async () => {
  const client = await wdio.remote(opts);
  await client.url('http://example.com');
  const title = await client.getTitle();
  console.log('Title:', title);
  await client.quit();
})();

Automate Hybrid Applications

This code demonstrates how to automate a hybrid application using Appium. It initializes a WebDriver client with the necessary capabilities for an iOS device, switches to the webview context, navigates to a URL, and retrieves the page title.

const wdio = require('webdriverio');
const opts = {
  port: 4723,
  capabilities: {
    platformName: 'iOS',
    platformVersion: '13.3',
    deviceName: 'iPhone 11',
    app: '/path/to/the/app.app',
    automationName: 'XCUITest'
  }
};
(async () => {
  const client = await wdio.remote(opts);
  await client.init();
  await client.context('WEBVIEW_1');
  await client.url('http://example.com');
  const title = await client.getTitle();
  console.log('Title:', title);
  await client.quit();
})();

Other packages similar to appium

Keywords

automation

FAQs

Package last updated on 17 Mar 2025

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