Robot Framework - SerialLibrary
Overview
PySerial Robot Framework Library is a Python library for interacting with serial devices using Robot Framework. This library provides keywords for connecting to serial devices, reading and writing data, setting timeouts, and more.
Installation
pip install robotframework-pyserial
Documentation
For detailed documentation of each keyword and usage examples, refer to the documentation in the below link,
https://reharish.github.io/robotframework-pyserial
Project Inspiration
-
zilogic-systems/parrot - Embedded Test Automation Framework, based on Robot Framework.
-
pySerial - Python serial port access library
Usage
To use the PySerial Robot Framework Library in your Robot Framework test suites, you need to import it at the beginning of your test suite file:
*** Settings ***
Library SerialLibrary
*** Test Cases ***
Example Test
Connect COM1 9600
Set Timeout 5
Write Hello, world!
${data}= Read
Should Be Equal ${data} Hello, world!
Disconnect from Serial
Keywords
| Keyword | Description |
|---|---|
| Connect | Connects to a serial device. |
| Disconnect | Disconnects from the serial device. |
| Set Timeout | Sets the read timeout for the serial device. |
| Set Write Timeout | Sets the write timeout for the serial device. |
| Set Unicode | Sets the Unicode encoding for data communication. |
| Read | Reads data from the serial device. |
| Write | Writes data to the serial device. |
| Read until | Reads data from the serial device until a specified string is encountered. |
| Read All | Reads all the data from the input buffer. |
| Reset Input Buffer | Clear the input buffer for the serial device. |
| Reset Output Buffer | Clear the output buffer for the serial device. |
| Save buffer to file | Saves the data buffer into a file. |
Contributors
- Harishbabu Rengaraj(@reharish)
- Abisheak Kumarasamy (@abi-sheak)
- Karl Palsson (@karlp)
License
- See the
LICENSEfile for details.
Metadata
Release files for robotframework-pyserial 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework_pyserial-1.4.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_pyserial-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / robotframework_pyserial-1.4.0.tar.gz
| Download URL | robotframework_pyserial-1.4.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7cd72a4f1374246e9038e4771b0f47978b3c075627ed4385643d097f1546260
|
|
BLAKE2b-256 checksum How to use checksums |
582c0c8b5623bc5dbbf8a218819fe896e27bbe1a597c1e9a4625a047e2a1f695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / robotframework_pyserial-1.4.0-py3-none-any.whl
| Download URL | robotframework_pyserial-1.4.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe6b4f47c0ab47f9ba5abf7f712c72bb0084e6c173e44555a10997caadbd396c
|
|
BLAKE2b-256 checksum How to use checksums |
77a63f0a6d2a5702b6e5127a6da9b6d6af41ab18071b0f0a0189a2ddf6e526d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|