Frabot Keywords
Login
Use Case
Logs into any Frappe site using provided credentials.
Performs login via the login page by:
Navigating to the given URL
Entering the username and password
Clicking the Login button
Waiting for the home page or dashboard to load
Arguments
Argument | Description |
---|---|
| Base URL of the Frappe site (e.g., |
| Login username (e.g., |
| Corresponding password |
Example Usage
Login http://localhost:8000 administrator admin
This opens the Frappe site, enters the admin credentials, and logs in.
Go To URL
Use Case
Navigates to a specific URL or Doctype page in a Frappe application.
If
navigate_url
is provided, it goes directly to that URL.If
Doctype
is provided, it constructs the path as/app/<doctype>
and navigates there.
Arguments
Argument | Description |
---|---|
| (Optional) Name of the Doctype to navigate to (e.g., |
| (Optional) Full URL to open (e.g., |
Example Usage
Go To URL navigate_url=http://localhost:8000/app/role
The second command opens the exact Role page URL.
Check URL
Use Case
Validates that the current browser URL contains the expected Doctype path, confirming that navigation to the correct page was successful.
Useful for asserting that the system is on the expected view (e.g., List or Form) of a specific Doctype.
Arguments
Argument | Description |
---|---|
| The name of the Doctype expected to appear in the URL (e.g., |
Example Usage
Check URL User
This asserts that the current URL contains /app/user
, ensuring the browser is on the User page.
Open Doctype
Use Case
Opens any Doctype, Report, or Page in a Frappe application using the search bar in the top navigation bar.
Searches for the specified name and opens the matching result.
Arguments
Argument | Description |
---|---|
| The name of the Doctype, Report, or Page to open (e.g., |
Example Usage
Open Doctype Item
This will search for Item in the navbar and navigate to the Item List View.
New Doc
Use Case
Opens a new document form for the specified Frappe Doctype.
Automatically navigates to the list or module page (if not already there), then clicks the “Add” (or “New”) button to open a fresh form for data entry.
Arguments
Argument | Description |
---|---|
| The name of the Frappe Doctype to open (e.g., |
Example Usage
New Doc Customer
This navigates to the Customer list view (if not already on it), and opens a new blank Customer form ready to be filled.
Fill
Use Case
Fills a specified field in a Frappe web form with a given value. Useful for automated data entry during UI testing.
Arguments
Argument | Description |
---|---|
| The name or label of the field on the form. |
| The value to be entered or selected in the specified field. |
Example Usage
Fill document_type Claim Book
This will find a select field named document_type
on the form and select the option "Claim Book".
Click Button
Use Case
Clicks a button inside a Frappe form.
Targets the button based on the Doctype and fieldname (the internal name of the button). This is commonly used for actions like creating linked documents (e.g., "Make Delivery Note").
Arguments
Argument | Description |
---|---|
| The internal fieldname of the button to click (e.g., |
Example Usage
Click Button make_delivery_note
This will click the "Make Delivery Note" button inside a Sales Invoice form.
Attach
Use Case
Attaches a file to a specific field in a Frappe form.
Useful for automating file uploads such as PDFs, images, or any document type, directly into a form field.
Arguments
Argument | Description |
---|---|
| The fieldname where the file should be attached (e.g., |
| The full file system path to the file (e.g., |
Example Usage
Attach attach_file /path/to/file.pdf
This attaches the file.pdf
to the attach_file
field in a Sales Invoice form.
Save Doc
Use Case
Saves the current form in a Frappe application.
Waits for the "Save" button to be available, clicks it, and waits for the form to complete the save operation.
Arguments
This keyword takes no arguments.
Example Usage
Save
This will save the currently open form.
Is Saved
Use Case
Checks if the current form is saved successfully within a specified timeout.
Waits until the document is saved.
Can optionally raise an error if it isn't saved in time.
Returns
True
if saved,False
otherwise.
Arguments
Argument | Description |
---|---|
| (Optional) Maximum time to wait for the save status. Defaults to |
| (Optional) Whether to raise an error if not saved ( |
Example Usage
Is Saved
Is Saved 10s 0
The first call checks if the document is saved using default config values.
The second waits up to 10 seconds and does not raise an error if it fails — it will return
False
instead.
Get Field Value
Use Case
Retrieves the current value of a specified field from the active Frappe form.
Useful for validating or using field data during test execution.
Arguments
Argument | Description |
---|---|
| The name of the field whose value needs to be fetched (e.g., |
Example Usage
${value}= Get Field Value customer_name
This fetches the value of the customer_name
field from the current form and stores it in ${value}
.
Select All
Use Case
Selects all records displayed in the current list view.
Automatically clicks the "Select All" checkbox at the top of the list table to check every visible record.
Arguments
This keyword takes no arguments.
Example Usage
Select All
This selects all records in the currently active list view.