Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. begin{verbbox}
  2. *** Settings ***
  3. Documentation A resource file with reusable keywords and variables.
  4.  
  5. Library Selenium2Library
  6. Library FakerLibrary WITH NAME faker
  7. Library DateTime WITH NAME DateTime
  8. end{verbbox}
  9. {centeringstackon[12pt]{footnotesizeparbox{textwidth}{ The textit{Library} keyword tells Robot that it needs to make sure that this is installed and available to use, otherwise it will tell you that importing the library failed. Selenium is needed in textbf{all} of our resource files.}}{theverbbox}\[1baselineskip]
  10.  
  11. In the above example I have imported two optional libraries (faker and DateTime). faker creates random data that can be used to populate fields, DateTime allows me to get the current date among other helpful functions. I have also used the textit{WITH NAME} argument, I have done so because it will make it more obvious to anyone new to Robot Framework tests which functions are being called from these libraries. I did textbf{not} do this for Selenium because Selenium is the base of most Robot Framework functionality and would not serve to clarify the function of our tests.\[1baselineskip]
  12.  
  13. Example of library keywords:\[1baselineskip]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement