https://github.com/reharish/robotframework-pyserial
Implementation of beloved pyserial module in robotframework.
https://github.com/reharish/robotframework-pyserial
pyserial robot-framework robotframework robotframework-library serial serial-communication
Last synced: 2 months ago
JSON representation
Implementation of beloved pyserial module in robotframework.
- Host: GitHub
- URL: https://github.com/reharish/robotframework-pyserial
- Owner: reharish
- License: apache-2.0
- Created: 2024-04-24T13:30:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-23T14:19:51.000Z (9 months ago)
- Last Synced: 2025-04-06T20:06:09.162Z (6 months ago)
- Topics: pyserial, robot-framework, robotframework, robotframework-library, serial, serial-communication
- Language: Python
- Homepage: https://reharish.github.io/robotframework-pyserial/
- Size: 142 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-robotframework - SerialLibrary
README
# 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

```bash
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](https://github.com/zilogic-systems/parrot) - Embedded Test Automation Framework, based on Robot Framework.
- [pySerial](https://github.com/pyserial/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:
```robot
*** 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](https://github.com/reharish))
- Abisheak Kumarasamy ([@abi-sheak](https://github.com/abi-sheak))
- Karl Palsson ([@karlp](https://github.com/karlp))## License
- See the `LICENSE` file for details.