diff --git a/Examples/my_first.robot b/Examples/my_first.robot index c019396..fb842cf 100644 --- a/Examples/my_first.robot +++ b/Examples/my_first.robot @@ -1,4 +1,6 @@ +# + *** Test Cases *** My First Robot Test - Log To Console Hello Robot World! \ No newline at end of file + Log To Console Hello Robot World! +# - diff --git a/Examples/my_second.robot b/Examples/my_second.robot index ed57c9c..4c855f5 100644 --- a/Examples/my_second.robot +++ b/Examples/my_second.robot @@ -1,7 +1,9 @@ +# + *** Settings *** Library OperatingSystem ***Test Cases*** My Second Robot Test - Create File new_file.txt Hello World! \ No newline at end of file + Create File new_file.txt Hello World! +# - diff --git a/Examples/my_third.robot b/Examples/my_third.robot index 61a2e12..3d973fd 100644 --- a/Examples/my_third.robot +++ b/Examples/my_third.robot @@ -1,3 +1,4 @@ +# + *** Settings *** Library OperatingSystem @@ -14,4 +15,5 @@ My Third Robot Test My Forth Robot Test ${file_content} = Get File new_file.txt Should Be Equal ${file_content} ${GOOD_TEXT} - Should Not Be Equal ${file_content} ${BAD_TEXT} \ No newline at end of file + Should Not Be Equal ${file_content} ${BAD_TEXT} +# - diff --git a/README.md b/README.md index 2c43b3d..ac961be 100644 --- a/README.md +++ b/README.md @@ -48,40 +48,49 @@ Following example shows how to write your first robot automation case: 1. Create a new file and save it using an extension `.robot`, for example, `my_first.robot` 2. Write in file `*** Test Cases ***`. This creates [section](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-data-sections) for test cases. 3. Type in following (note to add the four spaces before `Log To Console`) -``` -My First Robot Test - Log To Console Hello Robot World! -``` + + ```robotframework + My First Robot Test + Log To Console Hello Robot World! + ``` + 4. First test is now ready and it should look like this: -``` -*** Test Cases *** -My First Robot Test - Log To Console Hello Robot World! -``` + ```robotframework + *** Test Cases *** + + My First Robot Test + Log To Console Hello Robot World! + ``` + +
+ 5. Open Terminal/Command Prompt. Navigate to the same folder where your `.robot` file is located and run the test by inputting command `robot my_first.robot`. For example: -``` -cd your_folder -robot my_first.robot -``` + + ``` + cd your_folder + robot my_first.robot + ``` + 6. When Robot is run, you will see this: -``` -> robot my_first.robot -============================================================================== -My First -============================================================================== -My First Robot Test Hello Robot World! -My First Robot Test | PASS | ------------------------------------------------------------------------------- -My First | PASS | -1 critical test, 1 passed, 0 failed -1 test total, 1 passed, 0 failed -============================================================================== -Output: /output.xml -Log: /log.html -Report: /report.html - -``` + + ``` + > robot my_first.robot + ============================================================================== + My First + ============================================================================== + My First Robot Test Hello Robot World! + My First Robot Test | PASS | + ------------------------------------------------------------------------------ + My First | PASS | + 1 critical test, 1 passed, 0 failed + 1 test total, 1 passed, 0 failed + ============================================================================== + Output: /output.xml + Log: /log.html + Report: /report.html + + ``` Robot has created test report files in the same folder where you run the test. You can check details of the first test run by opening report.html file. [Examples](./Examples) of this manual introduces Keyword Libraries and Variables related to Robot Framework automation. @@ -89,3 +98,6 @@ Robot has created test report files in the same folder where you run the test. Y ## More information Thank you for visiting the Beginners Guide! Hope you enjoyed learning Robot Framework. More about writing test cases: [How To Write Good Test Cases](https://github.com/robotframework/HowToWriteGoodTestCases/blob/master/HowToWriteGoodTestCases.rst). + + + diff --git a/binder/custom.css b/binder/custom.css new file mode 100644 index 0000000..f15c014 --- /dev/null +++ b/binder/custom.css @@ -0,0 +1,31 @@ +#header, +#menubar, +#maintoolbar { + display: none !important; +} +#notebook { + margin: none !important; + padding: 0 !important; +} +#notebook-container { + margin: 0 !important; + padding: 0 !important; + box-shadow: none !important; + width: auto !important; +} +#site { + height: auto !important; +} +body { + background: white !important; + bottom: auto !important; + padding-bottom: 1px; +} +.end_space { + display: none; +} +.input_prompt, +.prompt, +.prompt_container { + display: none !important; +} diff --git a/binder/environment.yml b/binder/environment.yml new file mode 100644 index 0000000..97be851 --- /dev/null +++ b/binder/environment.yml @@ -0,0 +1,12 @@ +name: robotkernel +channels: + - conda-forge +dependencies: + - python >=3.6,<3.8.0a0 + - jupyterlab >=1.2.4,<1.3 + - nodejs >=11,<12 + - pip + - pip: + - robotframework==3.1.2 + - robotkernel==1.3.0 + - jupytext==1.3.2 diff --git a/binder/example.md b/binder/example.md new file mode 100644 index 0000000..f05fb13 --- /dev/null +++ b/binder/example.md @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +--- +jupyter: + jupytext: + text_representation: + extension: .md + format_name: markdown + format_version: '1.2' + jupytext_version: 1.3.2 + kernelspec: + display_name: Robot Framework + language: robotframework + name: robotkernel +--- + +```robotframework +*** Settings *** + +Library String + +*** Variables *** + +${MESSAGE} Hello World + +*** Test Cases *** + +Message is Hello World + Should be equal ${MESSAGE} Hello World +``` diff --git a/binder/example.robot b/binder/example.robot new file mode 100644 index 0000000..18bc734 --- /dev/null +++ b/binder/example.robot @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# --- +# jupyter: +# jupytext: +# text_representation: +# extension: .robot +# format_name: light +# format_version: '1.5' +# jupytext_version: 1.3.2 +# kernelspec: +# display_name: Robot Framework +# language: robotframework +# name: robotkernel +# --- + +# + +*** Settings *** + +Library String + +*** Variables *** + +${MESSAGE} Hello World + +*** Test Cases *** + +Message is Hello World + Should be equal ${MESSAGE} Hello World +# - diff --git a/binder/iframeResizer.contentWindow.min.js b/binder/iframeResizer.contentWindow.min.js new file mode 100644 index 0000000..284356a --- /dev/null +++ b/binder/iframeResizer.contentWindow.min.js @@ -0,0 +1,29 @@ +/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.9 - 2019-12-30 + * Desc: Include this file in any page being loaded into an iframe + * to force the iframe to resize to the content size. + * Requires: iframeResizer.min.js on host page. + * Copyright: (c) 2019 David J. Bradshaw - dave@bradshaw.net + * License: MIT + */ + +!function(d){if("undefined"!=typeof window){var n=!0,o=10,i="",r=0,a="",t=null,u="",c=!1,s={resize:1,click:1},l=128,f=!0,m=1,h="bodyOffset",g=h,p=!0,v="",y={},b=32,w=null,T=!1,E="[iFrameSizer]",O=E.length,S="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},I="child",N=!0,A=window.parent,C="*",z=0,k=!1,e=null,R=16,x=1,L="scroll",F=L,P=window,D=function(){re("onMessage function not defined")},j=function(){},q=function(){},H={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},B=!1;try{var J=Object.create({},{passive:{get:function(){B=!0}}});window.addEventListener("test",ee,J),window.removeEventListener("test",ee,J)}catch(e){}var U,V,K,Q,X,Y,G=Date.now||function(){return(new Date).getTime()},Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return H.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",we()))},taggedElement:function(){return be("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return H.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",we())},taggedElement:function(){return be("right","data-iframe-width")}},_=(U=Te,X=null,Y=0,function(){var e=G(),t=R-(e-(Y=Y||e));return V=this,K=arguments,t<=0||R