View on GitHub

Robotframework-excellibrary

Download this project as a .zip file Download this project as a tar.gz file

robotframework-excellibrary for Robot Framework

Introduction

Robotframework-excellibrary is a Robot Framework Library that provides keywords to allow opening, reading, writing and saving Excel files. The robotframework-excellibrary leverages two other python libraries xlutils and natsort. Xlutils installs xlrd that reads data from an Excel file and xlwt that can write to an Excel file.

Requirements

Installation

Using pip

The recommended installation tool is pip.

Install pip. Enter the following:

pip install robotframework-excellibrary

Append --upgrade to update both the library and all its dependencies to the latest version:

pip install --upgrade robotframework-excellibrary

To install a specific version enter:

pip install robotframework-excellibrary==(DesiredVersion)

Manual Installation

To install robotframework-excellibrary manually, install all dependency libraries before installing robotframework-excellibrary.

1) Install Robot Framework installed.

2) Download source distributions (*.tar.gz / *.zip) for the library and its dependencies.

robotframework-excellibrary and dependencies:

3) Extract each source distribution to a temporary location using 7zip (or your preferred zip program).

4) Open command line and go to each directory that was created from extraction and install each project using:

   python setup.py install

Uninstall

To uninstall robotframework-excellibrary use the following pip command:

pip uninstall robotframework-excellibrary

However, if the package was installed manually it will need to be uninstalled manually:

1) Navigate to C:\Python27\ExcelRobotTest and delete ExcelRobotTest.txt, and ExcelLibrary-KeywordDocumentation.html

2) Navigate to C:\Python27\Lib\site-packages and delete robotframework-excellibrary-0.0.2-py2.7.egg-info and the folder robotframework-excellibrary

Directory Layout

ExcelLibrary/ExcelLibrary.py : The Robot Python Library that makes use of the xlutils and natsort.

Tests/acceptance/ExcelRobotTest.txt : Example test file to display what various keywords from robotframework-excellibrary accomplish

doc/ExcelLibrary-KeywordDocumentation.html : Keyword documentation for the robotframework-excellibrary.

Usage

To write tests with Robot Framework and robotframework-excellibrary, ExcelLibrary must be imported into your Robot test suite. See Robot Framework User Guide for more information.

Running the Demo

The test file ExcelRobotTest.txt, is an easily executable test for Robot Framework using robotframework-excellibrary. For in depth detail on how the keywords function, read the Keyword documentation found here : Keyword Documentation

To run the test navigate to the Tests directory in C:\Python folder. Open a command prompt within the Tests/acceptance folder and run:

pybot ExcelRobotTest.txt

Things to Note When Using robotframework-excellibrary

Getting Help

The user group for Robot Framework is the best place to get help. Include in the post: