Robot Framework library for Android ADB interaction
Project description
ADBLibrary for Robot Framework
ADBLibrary is a custom Robot Framework library that provides Android Debug Bridge (ADB) functionalities such as:
- Executing 'adb' commands
- Running 'adb shell' commands
- Managing connected Android devices
- Capturing outputs from Android devices
This library is useful for Android client testing and automation scenarios involving ADB.
PREREQUISITES
Before using this library, ensure the following are installed on your system:
-
ADB (Android Debug Bridge)
ADB is required to communicate with Android devices.
On Ubuntu/Debian systems:
$ sudo apt-get update $ sudo apt-get install adb
On macOS using Homebrew:
$ brew install android-platform-toolsAlternatively, download ADB tools from: https://developer.android.com/studio/releases/platform-tools
-
Root Access (IMPORTANT)
If you want to access the full set of functionalities provided by ADBLibrary, your Android device must be connected with root access enabled.
INSTALLATION
-
Clone the repository (if not already):
$ git clone https://github.com/yourusername/ADBLibrary.git $ cd ADBLibrary -
Install Python dependencies:
$ pip install -r requirements.txtNote: It is recommended to use a virtual environment.
-
(Optional) Reload your profile if 'adb' is not recognized:
$ source ~/.profile
SETUP
Refer to the following setup diagram to connect your Android device and verify ADB:
EXAMPLE USAGE IN ROBOT FRAMEWORK
*** Settings ***
Library ADBLibrary
*** Variables ***
${ANDROID_VERSION} 14
*** Test Cases ***
TC001: Get Serial Number
${output} Execute Adb Command command=adb get-serialno
Log Android version is ${output}
TC002: Get Android Version
${output} Get Android Version
Should Be Equal As Integers ${output} ${ANDROID_VERSION}
TC003: Wake Up Screen
${stdout} Get State
Should Be Equal ${stdout} device
Execute Adb Shell Command command=input keyevent 224
PROJECT STRUCTURE
ADBLibrary/
├── src/
│ └── ADBLibrary.py --> Main Robot Framework library
├── doc/
│ └── ADBLibrary.html --> Keywords documentation
│ └── IMAGE1.png --> Setup diagram
├── test/
| └── sample.robot --> Sample robot file.
├── requirements.txt --> Python dependencies
├── README.md --> Project description
├── LICENSE.txt --> Apache License 2.0
├── setup.py --> Python packageing file
DOCUMENTATIONS
Refer to the following file for help with the available functionalities in the ADBLibrary:
ADBLibrary Keyword Reference ADBLibrary Keyword Reference
LICENSE
This project is licensed under the Apache License 2.0. https://www.apache.org/licenses/LICENSE-2.0
CONTRIBUTIONS
Contributions are welcome! Feel free to open issues or submit pull requests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_adblibrary-0.1.2.tar.gz.
File metadata
- Download URL: robotframework_adblibrary-0.1.2.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e76aa92f02da6642d555d2faccd984fd2775262539b0f45ade0e31be89098e
|
|
| MD5 |
7e7cbde3c5a43cb96a2435dc2bcf8992
|
|
| BLAKE2b-256 |
886a97b6fc77ade6136340bd558e475f76f8a973ad1d964aecb76123c02b0b8f
|
File details
Details for the file robotframework_adblibrary-0.1.2-py3-none-any.whl.
File metadata
- Download URL: robotframework_adblibrary-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
955a87f5858c8795d6ec53edbc8ebb4329fd649c36e92cf240fe75c3dec9c4b6
|
|
| MD5 |
4388cab830b1f0fcfd0334f0779ac1d2
|
|
| BLAKE2b-256 |
35e36cae59d38acb6645ffe0992f8464a686c3092e888448a5d202453792268b
|