Skip to main content

RobotFramework debug library and an interactive shell

Project description

Introduction

Robotframework-DebugLibrary is a debug library for RobotFramework, which can be used as an interactive shell(REPL) also.

Installation

To install using pip:

pip install robotframework-debuglibrary

Usage

You can use this as a library, import DebugLibrary and call Debug keyword in your test files like this:

*** Settings ***
Library         DebugLibrary

** test case **
SOME TEST
    # some keywords...
    Debug

Or you can run it standalone as a RobotFramework shell:

$ rfdebug
[...snap...]
>>>>> Enter interactive shell, only accepted plain text format keyword.
> help
Input Robotframework keywords, or commands listed below.
Use "libs" or "l" to see available libraries,
use "keywords" or "k" to see the list of library keywords,
use the TAB keyboard key to autocomplete keywords.

Documented commands (type help <topic>):
========================================
EOF  exit  help  k  keywords  l  libs  pdb  s  selenium

> log  hello
> get time
< '2011-10-13 18:50:31'
> BuiltIn.Get Time
< '2011-10-13 18:50:39'
> import library  String
> get substring  helloworld  5  8
< 'wor'
> ${secs} =  Get Time  epoch
# ${secs} = 1474814470
> Log to console  ${secs}
1474814470
> @{list} =  Create List    hello    world
# @{list} = ['hello', 'world']
> Log to console  ${list}
['hello', 'world']
> &{dict} =  Create Dictionary    name=admin    email=admin@test.local
# &{dict} = {'name': 'admin', 'email': 'admin@test.local'}
> Log  ${dict.name}
> help selenium
Start a selenium 2 webdriver and open url in browser you expect.

        s(elenium)  [<url>]  [<browser>]

        default url is google.com, default browser is firefox.
> selenium  google.com  chrome
# import library  Selenium2Library
# open browser  http://google.com  chrome
< 1
> close all browsers
> Ctrl-D
>>>>> Exit shell.

The interactive shell support auto-completion for robotframework keywords and commands. Try input BuiltIn. then type <TAB> key to feeling it. The history will save at ~/.rfdebug_history default or any file defined in environment variable RFDEBUG_HISTORY.

In case you don’t remember the name of keyword during using rfdebug, there are commands libs or l to list the imported libraries and built-in libraries, and keywords <lib name> or k to list keywords of a library.

Submitting issues

Bugs and enhancements are tracked in the issue tracker.

Before submitting a new issue, it is always a good idea to check is the same bug or enhancement already reported. If it is, please add your comments to the existing issue instead of creating a new one.

License

This software is licensed under the New BSD License. See the LICENSE file in the top distribution directory for the full license text.

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

robotframework-debuglibrary-1.0.3.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robotframework_debuglibrary-1.0.3-py2.py3-none-any.whl (11.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file robotframework-debuglibrary-1.0.3.tar.gz.

File metadata

File hashes

Hashes for robotframework-debuglibrary-1.0.3.tar.gz
Algorithm Hash digest
SHA256 62f6dc00c835b8c5fd75f49cf46c96f6ae08b9406ba933131a420253415bcc39
MD5 d9cfb5fc97f0d2986b4c042181fcaecb
BLAKE2b-256 71485e4799bc2bb37ed35c5a2f983390e64da2faf25153b88b8450f0960a1616

See more details on using hashes here.

File details

Details for the file robotframework_debuglibrary-1.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for robotframework_debuglibrary-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5c27513e2b608c53b7a0c079a48be669300931d09f7a8ba701a1f54c45871f10
MD5 772e8404dd14a18ee96b4378a4470244
BLAKE2b-256 85841bf41166c74ffc0a1e6e6043271ed55de02d5b89291d40cdf620be10bb37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page