Skip to content

chonla/robotframework-stringformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringFormat for Robot Framework

StringFormat is a string formatter for Robot Framework. This library is a python .format() wrapper.

Usage

*** Settings ***          
Library StringFormat        
*** Test Cases ***          
Format Text          
  ${url}= Format String https://api.domain.com/users/{0}/sites/{1} paul internal
  Should Be Equal ${url} https://api.domain.com/users/paul/sites/internal    
Format Dictionary Text          
  &{data}= Create Dictionary hostname=myhost domain=foo.com port=8080
  ${url}= Format String http://{hostname}.{domain}:{port} &{data}  
  Should Be Equal ${url} http://myhost.foo.com:8080    

Supported Format

StringFormat library utilizes python str.format method to construct formatted string. The format spec depends on what version of python this library being executed on. See the following resources for detail.

License

MIT

About

String Formatter for Robot Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published