GithubHelp home page GithubHelp logo

talkara / robotframework-debuglibrary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xyb/robotframework-debuglibrary

0.0 2.0 0.0 81 KB

A debug library for RobotFramework, which can be used as an interactive shell(REPL) also.

License: Other

Python 100.00%

robotframework-debuglibrary's Introduction

Debug Library for Robot Framework

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

Latest version License

To install using pip:

pip install robotframework-debuglibrary

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  d  docs  exit  help  k  keywords  l  libs  pdb  s  selenium

> log  hello
> get time
< '2011-10-13 18:50:31'
> # use TAB to auto complete commands
> BuiltIn.Get Time
< '2011-10-13 18:50:39'
> import library  String
> get substring  helloworld  5  8
< 'wor'
> # define variables as you wish
> ${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 protected]
# &{dict} = {'name': 'admin', 'email': '[email protected]'}
> Log  ${dict.name}
> # print value if you input variable name only
> ${list}
[u'hello', u'world']
> ${dict.name}
admin
> # start a selenium server quickly
> help selenium
Start a selenium 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  SeleniumLibrary
# 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.

rfdebug accept any pybot arguments, but by default, rfdebug disabled all logs with -l None -x None -o None -L None -r None.

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.

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

robotframework-debuglibrary's People

Contributors

xyb avatar jollychang avatar fspegni avatar meallia avatar jokimaki avatar silviot avatar vivainio avatar vincentfretin avatar asiekkinen avatar indrakumarm avatar serhatbolsu avatar swt-jnpr avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.