
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
appium-uiautomator2-server
Advanced tools
The appium-uiautomator2-server npm package is a server component for the Appium automation framework that uses Google's UiAutomator2 library to automate Android applications. It allows for advanced interactions with Android devices, including finding elements, performing gestures, and executing commands.
Finding Elements
This feature allows you to find elements on the screen using various strategies such as accessibility id, class name, XPath, etc.
const { UiAutomator2Driver } = require('appium-uiautomator2-driver');
const driver = new UiAutomator2Driver();
await driver.findElement('accessibility id', 'myElementId');
Performing Gestures
This feature allows you to perform touch gestures like tap, swipe, and pinch on the device screen.
const { UiAutomator2Driver } = require('appium-uiautomator2-driver');
const driver = new UiAutomator2Driver();
await driver.performTouch([{ action: 'tap', options: { x: 100, y: 200 } }]);
Executing Commands
This feature allows you to execute shell commands on the Android device, providing a way to interact with the device at a lower level.
const { UiAutomator2Driver } = require('appium-uiautomator2-driver');
const driver = new UiAutomator2Driver();
await driver.execute('mobile: shell', { command: 'input text', args: ['Hello World'] });
WebdriverIO is a popular automation framework that supports multiple browser and mobile automation protocols, including Appium. It provides a high-level API for interacting with web and mobile applications, making it easier to write and maintain tests compared to using appium-uiautomator2-server directly.
Detox is an end-to-end testing library for mobile apps developed by Wix. It is designed to work with React Native applications and provides a high-level API for writing tests. Unlike appium-uiautomator2-server, Detox is specifically tailored for React Native and offers a more integrated experience for those applications.
A netty server that runs on the device listening for commands and executes using UiAutomator V2.
build the android project using below commands
./gradlew clean assembleServerDebug assembleServerDebugAndroidTest
You can also build with specific version name and version code using this command.
./gradlew -PversionName=8.0.0 -PversionCode=300 clean assembleServerDebug assembleServerDebugAndroidTest
push both src and test apks to the device and execute the instrumentation tests.
adb shell am instrument -w io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner
build the unitTest flavor using the below commands
./gradlew clean assembleE2ETestDebug assembleE2ETestDebugAndroidTest
unitTest flavor contains tests for handlers and can be invoked by using following command
./gradlew clean connectedE2ETestDebugAndroidTest
the above command takes care about installing the AUT apk in to the testing device/emulator before running the tests.
you can also invoke the test using below command
adb shell am instrument -w io.appium.uiautomator2.e2etest.test/androidx.test.runner.AndroidJUnitRunner
Note: AUT apk should be installed before executing above command.
FAQs
A netty server with uiautomator2 handlers
The npm package appium-uiautomator2-server receives a total of 224,355 weekly downloads. As such, appium-uiautomator2-server popularity was classified as popular.
We found that appium-uiautomator2-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.