Robotframework implementation of beloved pyserial module
Project description
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 to Serial COM1 9600
Set Timeout 5
Write Hello, world!
${data}= Read
Should Be Equal ${data} Hello, world!
Disconnect from Serial
Keywords
Keyword | Description |
---|---|
Connect to Serial | Connects to a serial device. |
Disconnect from Serial | 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)
License
- See the
LICENSE
file for details.
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
Hashes for robotframework_pyserial-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f57a1948b318df1fc0fc54ac8de181d41ffbeb93bff650e510e0c4d3ea4115a |
|
MD5 | 4cc600a905bc6ac9e2d9619a30c054bd |
|
BLAKE2b-256 | 629e3fedbe0daa2122a632731b8554a589df7b2b47eddbdd85bfe0446367b294 |
Hashes for robotframework_pyserial-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19ccff6ca178b90d998944e8e69eb134d9f1ee63ad6d4286e8a75b70457b1921 |
|
MD5 | 9c7fb5396ae46edf9074481356cac584 |
|
BLAKE2b-256 | 19144dd9507c4b7d0831d56e38c0f923eee45ffc6961d869fab6092e0fc0b432 |