Setting Up and Configuring for Mobile App automationUsing Electron Scraper for Android Devices or iOS Devices

Using Electron Scraper for Android Devices or iOS Devices

Capture XPath locators from Android and iOS apps using the Electron Scraper tool.

Prerequisites

  1. Make sure an emulator or real device is connected.
  2. To install Electron Scraper, refer to Setting Up for Electron Scraper.

Using Electron Scraper for Android Devices

Perform the following:

Launch the Electron Scraper

The Electron Scraper detects the connected device and prepares it for scraping.

Verify the device name and UDID

Verify that the correct device name and UDID appear before proceeding.

Enter the App Package and App Activity

For more information on fetching App Package and App Activity, see How to fetch App Package and App Activity.

Click Run

This launches the specified app on the connected device or emulator.

Wait for the app to launch

Wait for the app to fully load before proceeding to the next step.

Confirm the app is running

Once the app is running, you can begin scraping UI elements.

Enter a valid screen name

The Screen Name can accept alphabets, alphanumeric characters, spaces, and underscores. It must start with an alphabet, number, or underscore.

Click Scrape

The scraper captures all UI elements on the current screen.

Verify the current screen

The current screen displayed on the real device or emulator is captured for scraping.

Review the scraped elements

Each row represents a UI element with its XPath and attributes.

Click Show Element to inspect an XPath

This helps you verify that the correct element is being captured.

Manage the scraped elements

These options help you manage and refine the scraped elements before downloading.

Update the screen or page name

This allows you to organize scraped elements by screen or page.

Download the scraped elements

The downloaded CSV file contains all the scraped UI elements and their XPath details.

Using Electron Scraper for iOS Devices

After connecting the simulator, when you select the device name as iOS, the device name and UDID will be displayed automatically. You need to update the App Name, URL, and Bundle ID. Click Run and follow the same procedure described in the preceding steps, then download the required file in .json format.