DoesIsLibrary for Robot Framework
Introduction
RobotFramework library which extends imported libraries with Does and Is keywords.
RobotFramework libraries provides assertion keywords, usually named like Something Should Exist, Another Thing Should Be Eqal, Yet Another Should Not Exist, Some Should Not Be Equal. This library extracts such keywords from libraries imported in suite, and extends libraries from where those keywords come from with Does and Is keywords, like:
Orginal keyword - Newly created keyword Something Should Exist - Does Somethin Exist Another Thing Should Be Eqal - Is Another Thing Equal Yet Another Should Not Exist - Does Yest Another Not Exist Some Should Not Be Equal - Is Some Not Equal
Orginal Keywords PASS or FAIL depending of assertion is met or not, while newly created keyword returns True or False
Use Case is shown in follwing example:
Usage
WithoutLibrary.robot
*** Settings ***
Library SeleniumLibrary
*** Test Cases ***
NoLibrary
${are_equal}= Run Keyword And Return Status Should Be Equal As Numbers 10 10
Run Keyword If '${are_equal}'=='True' Log Equal!
Open Browser http://example.local gc
${is_element_visible}= Run Keyword And Return Status Element Should Be Visible id=locator
Run Keyword If '${is_element_visible}'=='True' Click Element id=locator
WithLibrary.robot
*** Settings ***
Library SeleniumLibrary
Library DoesIsLibrary
*** Test Cases ***
WithLibrary
${are_equal}= Is Equal As Numbers 10 10
Run Keyword If '${are_equal}'=='True' Log Equal!
Open Browser http://example.local gc
${is_element_visible}= Is Element Visible id=locator
Run Keyword If '${is_element_visible}'=='True' Click Element id=locator
Library Does not provide almost all "static" keywords, except List Is Keywords and List Does keywords which place names of newly dynamically generated keywords in RF log.html file.
- Information about keywords can be found on the Keyword Documentation page.
How it works and limitations
Library is looking for imported libraries from Settings section during start suite phase and then looks for keyword having 'should' in keyword name. Then new keywords are created for each imported library respectively.
As (for now) new keyword generation is triggerd in suite setup phase, new keywords will not be generated for libraries imported with RF built in keyword Import Library
Requirements
- Robot Framework
Installation
Using pip
The recommended installation tool is pip.
Install pip. Enter the following:
pip install robotframework-doesislibrary
Metadata
Release files for robotframework-doesislibrary 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| robotframework_doesislibrary-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for robotframework_doesislibrary-0.1.0-py3-none-any.whl |
Release files / robotframework_doesislibrary-0.1.0-py3-none-any.whl
| Download URL | robotframework_doesislibrary-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4437de15b586f11ba2ecc02d1bd6ecc416e91589359830bd6d37405a3d10de71
|
|
BLAKE2b-256 checksum How to use checksums |
bb9e179408992894b7b96a55036887b6058ea3518dab4ca7970ec4fff5d79c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
|
Security for robotframework-doesislibrary 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.