Add Checkbox

Add checkbox element

Arguments

Argument Type Default value Description
label strcheck box element label
element_id strcheck box element identifier
options strvalues for the check box
default str Nonecheck box selected value, defaults to None
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
label strdropdown element label
element_id strdropdown element id attribute
options typing.Anyvalues for the dropdown
default str Nonedropdown selected value, defaults to None
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
label strinput element label
element_id strhidden element id attribute
name strinput element name attribute
filetypes straccepted filetypes for the file upload
target_directory str Nonewhere to save uploaded files to
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
name strinput element name attribute
value strinput element value attribute
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 Radio Buttons

Add radio button element

Arguments

Argument Type Default value Description
element_id strradio button element identifier
options strvalues for the radio button
default str Noneradio button selected value, defaults to None
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
name strelement name attribute
buttons strlist of buttons
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
value strtext for the element
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
label strinput element label
name strinput element name attribute
value str Noneinput element value attribute
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
name strtextarea element name
rows int 5number of rows for the area, defaults to 5
cols int 40numnber of columns for the area, defaults to 40
default str Noneprefilled text for the area, defaults to None
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
title strtext for the element
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
title str Noneform title, defaults to None
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
formspec str Noneform json specification file, defaults to None
window_width int 600window width in pixels, defaults to 600
window_height int 1000window height in pixels, defaults to 1000
timeout int Noneoptional time to wait for response, in seconds
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