npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nightwatch/mobile-helper

v1.0.2

Published

Easily setup all the requirements needed to get started with mobile-web testing using Nightwatch.

Downloads

9,780

Readme

@nightwatch/mobile-helper

Official Nightwatch tool to help easily setup all the requirements needed to get started with mobile testing in Nightwatch.js. Nightwatch.js supports web and native app testing in both Android and iOS devices.

BONUS: For Android folks, there's much more this tool has to offer now apart for setting up requirements for testing:

  • Setup fully functional Android Emulator environment in a matter of minutes (without downloading Android Studio).
  • Alternatively, setup just adb to only connect to real devices.
  • Easy-to-use CLI flows for common use-cases like connecting to emulator/real devices, downloading new system-images, creating/deleting AVDs, installing/uninstalling apps, and much more.
  • For use-cases not covered above, run commands with major Android SDK tools like adb, emualator, sdkmanager, avdmanager directly from a single CLI.
  • Update your SDK tools automatically and seamlessly (WIP).

Usage

Do more with Android

Setup Android SDKs

You can now setup a fully functional Android Emulator environment, or just adb for connecting to real device, without the need to download the whole Android Studio IDE.

Run the below command to download all the required Android SDKs needed to get the Android Emulator setup and running with Android v11:

npx @nightwatch/mobile-helper android --standalone

The above command makes sure that you have everything you need to use Android Emulator as well as connect your computer to real Android devices.

CLI Flows for common use-cases

This tool allows you to do a lot of things with simple and tailored flows, accessible through the following subcommands:

  1. connect
  2. list
  3. install
  4. uninstall

Syntax

The following syntax is used for executing subcommands:

npx @nightwatch/mobile-helper android <subcommand> [flags|cliConfigs]

1. connect

This subcommand allows you to connect to a real device using adb or launch an AVD (Android Virtual Device) inside Android Emulator.

npx @nightwatch/mobile-helper android connect [flags]

| Flag | Description | | ---------- | ------------------------------------- | | --wireless | Connect a real device wirelessly | | --emulator | Launch an AVD inside Android Emulator.|

For more details on the usage of the connect subcommand, please refer to this doc.

2. list

This subcommand allows you to list all connected devices and installed AVDs.

npx @nightwatch/mobile-helper android list [flags]

| Flag | Description | | ---------- | ------------------------------------------------------ | | --device | Show a list of all the connected real devices and AVDs | | --avd | Show a list of all the currently installed AVDs |

For more details on the usage of the list subcommand, please refer to this doc.

3. install

This subcommand allows you to install a new system-image, create a new AVD or install an app to a target AVD/device.

npx @nightwatch/mobile-helper android install [flags]

| Flag | Description | | -------------- | ------------------------------------------ | | --app | Install an APK on a real device or an AVD | | --avd | Create a new AVD | | --system-image | Install a new system-image |

For more details on the usage of the install subcommand, please refer to this doc.

4. uninstall

This subcommand allows you to uninstall a system-image, delete an AVD, or uninstall an app from a target device.

npx @nightwatch/mobile-helper android uninstall [flags]

| Flag | Description | | -------------- | ---------------------------------------------- | | --app | Uninstall an app from a real device or an AVD | | --avd | Delete an AVD | | --system-image | Uninstall a system-image |

For more details on the usage of the uninstall subcommand, please refer to this doc.

Run Android SDK tool commands

Run commands with major Android SDK tools/binaries directly from a single CLI without the need to locate and then run the binaries manually.

Syntax

npx @nightwatch/mobile-helper android.<binary_name> [args]

Currently supported binaries: adb, avdmanager, sdkmanager and emulator.

Examples

  1. List all the devices connected through adb:
    npx @nightwatch/mobile-helper android.adb devices
  2. Start the Android Emulator with an AVD:
    npx @nightwatch/mobile-helper android.emulator @nightwatch-android-11
  3. List all installed system images (along with other packages):
    npx @nightwatch/mobile-helper android.sdkmanager --list_installed
  4. List all installed Android Virtual Devices (AVDs):
    npx @nightwatch/mobile-helper android.avdmanager list avd

Check the following docs to know more about the usage of the above mentioned binaries: