Add Checkbox

Add checkbox element

Arguments

Argument Type Default value Description
labelstrnull
element_idstrnull
optionsstrnull
defaultstr, NoneNone
param label:check box element label
param element_id:
 check box element identifier
param options:values for the check box
param default:check box selected value, defaults to None

Examples

*** Tasks ***
Create Form
Add Checkbox    label=Select your colors
...             element_id=colors
...             options=green,red,blue,yellow
...             default=blue

Add Dropdown

Add dropdown element

Arguments

Argument Type Default value Description
labelstrnull
element_idstrnull
optionsAnynull
defaultstr, NoneNone
param label:dropdown element label
param element_id:
 dropdown element id attribute
param options:values for the dropdown
param default:dropdown selected value, defaults to None

Examples

*** Tasks ***
Create Form
Add Dropdown  label=Select task type
...           element_id=tasktype
...           options=buy,sell,rent
...           default=buy

Add File Input

Add text input element

Arguments

Argument Type Default value Description
labelstrnull
element_idstrnull
namestrnull
filetypesstrnull
target_directorystr, NoneNone
param label:input element label
param element_id:
 hidden element id attribute
param name:input element name attribute
param filetypes:
 accepted filetypes for the file upload
param target_directory:
 where to save uploaded files to

Read more of the filetypes in the library documentation.

Examples

*** Tasks ***
Create Form
Add File Input  label=Attachment
...             element_id=attachment
...             name=attachment
...             filetypes=${EMPTY}         # Accept all files
...             target_directory=${CURDIR}${/}output

Add File Input  label=Contract
...             element_id=contract
...             name=contract
...             filetypes=application/pdf  # Accept only PDFs
...             target_directory=${CURDIR}${/}output

Add Hidden Input

Add hidden input element

Arguments

Argument Type Default value Description
namestrnull
valuestrnull
param name:input element name attribute
param value:input element value attribute

Examples

*** Tasks ***
Create Form
${uuid}   Evaluate  str(uuid.uuid4())
Add Hidden Input    form-id   ${uuid}

Add Password Input

Add password input element

Arguments

Argument Type Default value Description
labelstrnull
namestrnull
valuestr, NoneNone
param label:input element label
param name:input element name attribute
param value:input element value attribute

Examples

Add Radio Buttons

Add radio button element

Arguments

Argument Type Default value Description
element_idstrnull
optionsstrnull
defaultstr, NoneNone
param element_id:
 radio button element identifier
param options:values for the radio button
param default:radio button selected value, defaults to None

Examples

*** Tasks ***
Create Form
Add Radio Button   element_id=drone  buttons=Jim,Robert  default=Robert

Add Submit

Add submit element

Arguments

Argument Type Default value Description
namestrnull
buttonsstrnull
param name:element name attribute
param buttons:list of buttons

Examples

*** Tasks ***
Create Form
Add Submit    name=direction-to-go  buttons=left,right

Add Text

Add text paragraph element

Arguments

Argument Type Default value Description
valuestrnull
param value:text for the element

Example.

*** Tasks ***
Create Form
Add Text       ${form_guidance_text}

Add Text Input

Add text input element

Arguments

Argument Type Default value Description
labelstrnull
namestrnull
valuestr, NoneNone
param label:input element label
param name:input element name attribute
param value:input element value attribute

Examples

*** Tasks ***
Create Form
Add Text Input   what is your firstname ?  fname   value=Mika

Add Textarea

Add textarea element

Arguments

Argument Type Default value Description
namestrnull
rowsint5
colsint40
defaultstr, NoneNone
param name:textarea element name
param rows:number of rows for the area, defaults to 5
param cols:numnber of columns for the area, defaults to 40
param default:prefilled text for the area, defaults to None

Examples

*** Tasks ***
Create Form
Add Textarea       name=feedback  default=enter feedback here
Add Textarea       name=texts  rows=40   cols=80

Add Title

Add h3 element into form

Arguments

Argument Type Default value Description
titlestrnull
param title:text for the element

Examples

*** Tasks ***
Create Form     # default form title will be "Requesting response"
Add Title       User Confirmation Form

Create Form

Create new form

Arguments

Argument Type Default value Description
titlestr, NoneNone
param title:form title, defaults to None

Examples

*** Tasks ***
Create Form     # form title will be "Requesting response"
Create Form     title=User Confirmation Form

Request Response

Start server and show form. Waits for user response.

Arguments

Argument Type Default value Description
formspecstr, NoneNone
window_widthint600
window_heightint1000
timeoutint, NoneNone
param formspec:form json specification file, defaults to None
param window_width:
 window width in pixels, defaults to 600
param window_height:
 window height in pixels, defaults to 1000
param timeout:optional time to wait for response, in seconds
return:form response

Examples

*** Tasks ***
Create Form    ${CURDIR}/${/}myform.json
&{response}    Request Response