Functionize offers a wide variety of Test Actions to automate testing of your application under test (AUT). There are two categories of Test Actions that we will provide details for below: Element-based and Non-Element-based.
Architect Test Actions
Certain Test Actions are added automatically by Architect during recording, such as Pageinit, every time a URL opens or reloads. Some Test Actions, such as opening the Email Reader tool or Not on Page, are available to add via Architect during initial recording or Local Edit.
Inserting Test Actions
Functionize has a feature called Quick Add that makes it easy to insert Test Actions without having to record with Architect. Element-based Test Actions can be added to existing tests through the Slider View. Here the element can be selected and associated attributes set from the last-run screenshot. Non-Element-based Test Actions can be added to existing tests from the Test Details page as well as the Slider View.
Editing Test Actions
The Test Action Settings for both Element-based and Non-Element-based Test Actions can be viewed and edited in both the Test Details page and Slider View.
Actions List
This list contains all Test Actions available in Functionize automated tests, as well as the Test Action Settings available for each by default. Click the name of any Test Action to jump down to see the default Test Action Setting details.
Element-based Test Actions
- Click: Click an element on the webpage.
- Contextswitch: Added by Architect to denote switching context, such as browser tabs or iFrames.
- Doubleclick: Double-click an element on the webpage.
- Dragby: Track a drag via mouse coordinates.
- Enter: Add an Enter keypress.
- ESignature: Enter an E-signature item into a webpage input.
- Hover: Application elements with ‘on-hover’ activations.
- Html5dragdrop: Drag and drop HTML5 elements provided by the browser.
- Input: Enter test data into an element within the application under test.
- Rightclick: Right-click an element within application under test.
- Scroll: Move to a new location on the webpage.
- Select: Select a specific webpage element, such as drop-down list.
- Textselect: Select (highlight) text on a webpage.
- Upload: Upload a static or dynamic file to the application under test.
- Verify: Verify attributes or CSS style sheet properties of any webpage elements.
- Verify-Visual Verification: Perform a visual check on individual webpage elements based on a Baseline or a Previous Step.
Non-Element-based Test Actions
- Alert: Click OK on a JavaScript alert pop-up modal.
- Apicall: Open the Functionize API Explorer tool for testing API calls.
- Break: Add custom JavaScript to return a true/false statement, if returns true, the loop will break.
- Conditional: Add custom JavaScript to return a true/false statement, if returns true, the conditional executes.
- Confirmation: Click OK or Cancel on a pop-up modal.
- Continue: Add custom JavaScript to return a true/false statement, if returns true, the loop will continue.
- Customcode: Add custom JavaScript functions for advanced testing needs.
- DBExplorer: Open the Functionize DB Explorer tool for testing backend databases.
- Download: Download a file from the application under test.
- Emailreceive: Open the Functionize Email Reader tool.
- Extension-curl: Call cURL commands to call an API as part of a test execution.
- Extension-curl extension: UNDER DEVELOPMENT Users should be able to copy/paste cURL commands directly from Postman.
- Extension-Postman Collection: UNDER DEVELOPMENT Postman Collection: Users can access Postman Collections via import of your JSON file.
- FileViewer: Open the Functionize File Viewer tool.
- Keypress: Add a keypress as part of test execution, such as an arrow key.
- Loop: Perform a set of test actions a set number of time or based on adding custom JavaScript to determine when a loop should continue to execute or exited.
- Navigate: Direct the test to a new URL.
- Notonpage: Confirm an item does not exist on a webpage.
- Pageinit: Added by Architect every time a page is initialized.
- Prompt: Input text into a webpage prompt modal.
- Resize: Resize the browser window.
- SetCookie: Injecting cookie data into the application under test during test execution.
- SetHTMLStorage: Injecting HTML5 data into the application under test during test execution.
- SetVariable: Using a Functionize Expression to store data in a variable to be used later in the same test (Local Variable) or other tests (Project Variable).
- Smsreceive: Open the Functionize SMS Reader tool to receive a message.
- Smssend: Open the Functionize SMS Reader tool to send a message.
- Urlchange: Added by Architect to direct the test to a new URL.
- VerifyVariable: Verify contents of Variables created by SetVariable action type.
- Vispagechk: Perform a full-page visual check based on a Baseline or a Previous Step.
- Wait: Set time (in milliseconds) to pause the execution of a test in order to wait for backend processing to complete. This Action Type has SmartWait capabilities to continue test if network calls complete before wait time.
Element-based Test Action Settings
List of all Element-based Test Actions and their default settings.
Click Action
Settings TAB | Advanced TAB |
|
|
Contextswitch
Settings TAB | Advanced TAB |
|
|
Doubleclick
Settings TAB | Advanced TAB |
|
|
Dragby
Settings TAB | Advanced TAB |
|
|
Enter
Settings TAB | Advanced TAB |
|
|
ESignature
Settings TAB | Advanced TAB |
|
|
Hover
Settings TAB | Advanced TAB |
|
|
Html5dragdrop
Settings TAB | Advanced TAB |
|
|
Input
Settings TAB | Advanced TAB |
|
|
Rightclick
Settings TAB | Advanced TAB |
|
|
Scroll
Settings TAB | Advanced TAB |
|
|
Select
Settings TAB | Advanced TAB |
|
|
Textselect
Settings TAB | Advanced TAB |
|
|
Upload
Settings TAB | Advanced TAB |
|
|
Verify
Settings TAB | Advanced TAB |
|
|
Verify-Visual Verification
Settings TAB | Advanced TAB |
|
|
Non-Element-based Test Action Settings
List of all Non-Element-based Test Actions and their default settings.
Alert
Settings TAB | Advanced TAB |
|
|
Apicall
Settings TAB | Advanced TAB |
|
|
Break
Settings TAB | Advanced TAB |
|
|
Conditional
Settings TAB | Advanced TAB |
|
|
Confirm
Settings TAB | Advanced TAB |
|
|
Continue
Settings TAB | Advanced TAB |
|
|
Customcode
Settings TAB | Advanced TAB |
|
|
DBExplorer
Settings TAB | Advanced TAB |
|
|
Download
Settings TAB | Advanced TAB |
|
|
Emailreceive
Settings TAB | Advanced TAB |
|
|
Extension-curl
Settings TAB | Advanced TAB |
|
|
Extension-curl extension
Settings TAB | Advanced TAB |
|
|
Extension-Postman Collection
Settings TAB | Advanced TAB |
|
|
FileViewer
Settings TAB | Advanced TAB |
|
|
Keypress
Settings TAB | Advanced TAB |
|
|
Loop
Settings TAB | Advanced TAB |
|
|
Navigate
Settings TAB | Advanced TAB |
|
|
Notonpage
Settings TAB | Advanced TAB |
|
|
Pageinit
Settings TAB | Advanced TAB |
|
|
Prompt
Settings TAB | Advanced TAB |
|
|
Resize
Settings TAB | Advanced TAB |
|
|
SetCookie
Settings TAB | Advanced TAB |
|
|
SetHTMLStorage
Settings TAB | Advanced TAB |
|
|
SetVariable
Settings TAB | Advanced TAB |
|
|
Smsreceive
Settings TAB | Advanced TAB |
|
|
Smssend Action
Settings TAB | Advanced TAB |
|
|
Urlchange Action
Settings Tab | Advanced Tab |
|
|
VerifyVariable Action
Settings Tab | Advanced Tab |
|
|
Vispagechk Action
Settings Tab | Advanced Tab |
|
|
Wait Action
Settings Tab | Advanced Tab |
|
|
Advanced Uses of Actions
Verification Action
Simple data verifications can be easily completed by clicking the Flag icon button in Architect
and then select the element for verification. It's advisable to avoid verifying large elements that consist of multiple smaller elements. Each verification should target a specific, lowest level element. Selecting a <div> that contains multiple elements reduces the self-healing capabilities of the test.
Advanced Attribute Validation
Advanced verifications are used for verifying dynamic data and are leveraged in combination with Operators.
- Click the white circle to the left of the Verify Action
- The Architect left panel will open to the ADV Validation tab where you can specify the Attributes to validate in the Verify Action.
- The Attribute Validation tab allows a User to verify specific attributes of an element, most commonly used are text, value, and SRC, though all attributes associated with an element are accessible, both DOM and/or CSS
- Select the Attribute and Operator as well as the appropriate value for your verification, Operators like 'contains', 'greater than' and 'equals step value', specific verifications can be added easily with no code required
- Click Save
- The Architect left panel will close and your Verify Action will be updated
Multiple Validations on a Single Verification
It is possible to save multiple validations on a single Verify Action with the Multiple button option using OR and AND operators.
- If OR is used: The test will check for the first true condition and once verified, no further check will be performed and will immediately move onto the next step
- If AND is used: All existing conditions will be checked
Custom Attribute Validation
Custom JavaScript can be used to facilitate very specific verifications, including verifications that contain logic like addition and subtraction.
Visual Check Validation
The Visual Check button allows for visual validation of elements.
However, this is limited to specific elements and images and does not apply to sections of pages that consist of multiple elements.
Advanced Selector
The ADV Selector tab in the Architect left panel for an action contains two options to enhance the precision of your tests by utilizing selectors.
DOM Panel
- Click the arrow icons to walk the DOM from the current element to select any element regardless of size or other overlapping elements
- In the text box, enter the ID, Query Selector, or CSS Class of your desired element and click the Search button to verify the element on the site
Override Panel
- ML Selector: Machine learning based, default option, overriding this option inhibits the ability to self-heal by learning your site
- Specify Selector: Identify another selector to locate the element by enter XPath or CSS selector from the browser or choose from a list via the Snippets button
- JS Override Selector: Use JQuery to write a custom selector locating the element and bypassing the ML selector
Generating Random Data
The Architect can be used to generate random test data, including fully functional email addresses, date formats, etc., which can be checked as part of a test case. This functionality makes it easy to test many use cases, such as form fills, user sign-ups, password resets, and marketing email automation.
Generating Data in Architect
- Generating random data is an advanced action that can be accessed by clicking the + icon on the Architect window
- Click Generate Data in the Architect sidebar panel
- From the menu, select the data type to generate, based on the selection made, the appropriate data parameters will display
Generate a Random Email
- Click the Email button, and a random email address appears in the Output Example field, this function generates only one email address per test case, if multiple steps are used Generate Data with Email - the email will remain the same within a single test caseNOTE: The random email address generated will always be a 'functionizeapp.com' email address.
- The Domain field can be used to generate random emails for a specific domain defined by the UserNOTE: Only the 'functionizeapp.com' will be accessible from the Functionize Email Reader Tool
- Click Set Target, Architect will minimize in order for the User to click the input field where the User wishes the email to be entered
- The selected field will populate with the generated email address, see more information on the Functionize Email Reader Tool
- Every time the test case is executed, a new random Email will be generated
Generate a Date
- Click the Date button, the default date format is MM/DD/YYYY, other date formats are available to support commonly used date formats in various countries as follows: DD/MM/YYYY, YYYY/MM/DD, MM/DD/YY, and DD/MM/YY, these other date formats are accessible by clicking the drop-down menu under Date Format
- Select the desired Date Format and Date Delimiter.
- By default, the date generated will be the Current Date, to alter the date, select Days, Months, or Years from the drop-down menu, set the Add/Subtract toggle switch to the preferred direction, and enter the number of days, months, or years to advance or reverse the date in the Output Example field
- Click Set Target button when ready and Architect will minimize for the User to select the input field to enter the generated date
- The selected field will populate with the generated Date
Context Switch Action
Context Switch is an action type created when switching contexts (to an iFrame, for example) during test creation. This kind of action is helpful when editing tests to ensure newly added actions are added into the appropriate context.
View Context Switch on Existing Test
After you create the Test Case, you can see the contextswitch action in multiple areas.
- From the Actions tab of the Test Case, expand the test step with the contextswitch action to see it displayed.
- This information is also viewable in the Slider View. Click the View button on the test action.
- Click the gear icon on the contextswitch action to display the details of the element.
NOTE: This action is added to Architect for visibility only. We do not recommend rearranging actions as the context switch and pageinit actions will be added automatically. Upon adding a next step, to move outside the iframe, Architect will add another contextswtich action to notate the move back to the main window.
Download Action
Download Actions will capture the file being downloaded from site under test. This can be used as the source for a file Upload Action later in the test.
- Before executing your test, the Download Action will not display the file as actively attached
- Once you execute the test, the Download Action will have the file attached, which can be used in subsequent Actions
Extension Action
Functionize Extensions, or microservice endpoints, open up test executions to almost unlimited possibilities. Extensions open the Functionize platform to be fully programmable by exposing our runtime object model. Users can manipulate runtime input values, uploaded and downloaded files, screenshots, variables & expressions, TDM data and Orchestration information; the sky is the limit. Extensions offer you the ability to manipulate your tests in nearly countless ways.
These reusable Extension components can be written, saved, and used throughout a user's Functionize account. Extensions can be registered for runtime execution on existing test actions as pre-action/post-action execution or called as a separate, stand-alone test action.
Extension-curl Action
cURL (short for "Client URL") is a command line tool that enables data transfer over various network protocols. It communicates with a web or application server by specifying a relevant URL and the data that need to be sent or received.
cURL makes HTTP requests just like a web browser. To request a web page from the command line, type curl followed by the site's URL: The web server's response is displayed directly in your command-line interface.
The basic cURL syntax is as follows:
curl[options/URLs]
Create an Extension-curl Action in Architect
- Click the + icon from the main screen of Architect and then select Extension under Advanced actions in the side panel
- Click on the Create a new Action
- Enter cURL command, sample Command already present:curl http://worldtimeapi.org/api/timezone/America/Detroit
- Click on the Validate button to get the Result
- Click on the Add button in the left side panel
Add an Extension-curl Action in an Existing Test Case
Functionize allows you to add a cURL command through the Extension action that you can add to your test case via Quick Add on the Test detail page and Slider page.
Insert Extension-curl Action via the Test Detail page
- Go to the Test details page of the test
- Hover where you would like to insert the action
- Open the Insert menu + and select Extension
- A dialog box titled Insert Extension will appear, and curl will be selected as default
- From here, a user can enter their own cURL command, a sample Command is already present:curl http://worldtimeapi.org/api/timezone/America/Detroit
- Click on the Validate button to get the Expected Response for the cURL command
- Click on the Insert button
Insert an Extension-curl Action via Slider View
- Go to the Test details page of the test
- Open Slider view via the View Results button or the View button next to any action
- Click the Quick Add button at the step where you would like to insert the action.
- Open the Insert menu and select Extension
- A dialog box titled Insert Extension will appear, and curl will be selected as default
- From here, a user can enter their own cURL command, a sample Command is already present:curl http://worldtimeapi.org/api/timezone/America/Detroit
- Click on the Validate button to get the Expected Response for the cURL command
- Click on the Insert button
- The new Extension-curl Action will be added below the action
Test your Extension-curl Actions
The user can test the added cURL command by running the test case once they have inserted the Extension-curl Action.
- Open Test Detail pageNote: The Extension-curl Action can be deleted from the Test Detail page or Slider view
- Click on the Execute button
- Click on Headless run/ Live Debug/ Live Execution
- Check the status of the Extension-curl Action after the execution is complete
- The Pass/Fail status will show on the action and the response will show under the Extension TAB of the footer of the Slider view
Add Variable in an Extension-curl Action
Functionize allows users to use Variables within Extension-curl Actions. This enables users to create dynamic requests that can be utilized in their tests. Users can employ variables within a cURL Command in Functionize. The syntax for this involves double curly brackets '{{}}', and the Variables can be used anywhere in the cURL Command.
For example, if you have a variable called myVar that contains a string, you can use it in the cURL Command like this:
curl -X POST -d '{"data": "{{myVar}}"}
How to use Variables within a cURL Command
- After you have successfully added your Extension-curl Action, click on the {x} button present in the bottom of the Architect
- Click on the Add Variable button
- Enter a Variable Name and set the Scope to Local
- Select Type as Previous Action
- Select the extension step
- Select extensionResponse in the Step Attribute drop-down
- Select JSON.parse in the Operator dropdown
- Select the Property, in this example we selected day_of _year
- Click on the Save on the left side panel
- setVariable Action will be added to the test in Architect
- Add a Verify Action that equals the value that exists on the page
- Click on the white circle alongside the Verify Action
- Input the Variable value {{fze.local.api}} in DOM Validation section in the left side panel, if the value changes, then it dynamically verifies the updated value rather than the value that was recorded at the time of creation
- Click on the Save in the left side panel
- Verify Action will be added to the test in Architect
Curl Example
cURL makes HTTP requests just like a web browser and the web server's response is displayed directly in your command-line interface. Here is an example of a cURL command that calls out to a public endpoint for the World Time API:
//This cURL command for the World Time API will respond with the date, time, //day of week, day of the year and timezone of any particular region. {"command":"curl http://worldtimeapi.org/api/timezone/America/Toronto"}
Enter this command and then click on Validate to see the expected response.
Extension-curl extension Action
The Extension-curl extension Action allows users to use the URL syntax to receive and submit data. Its UI is similar to the API Explorer but is for calling cURL Extensions.
The cURL command can be entered directly into the input field. This allows users to avoid dealing with escaping quotes. Users should be able to enter cURL commands directly, similar to Postman or GitHub, and have them work in a Functionize test.
The Extension-curl extension Action has four HTTP request methods to use in the cURL command:
- GET: GET requests are used to retrieve data from a specified resource
- POST: POST requests are used to submit or send data to the server to create a new resource or perform some action on the server
- PUT: PUT requests are used to update or replace an existing resource on the server with a new representation provided in the request
- DELETE: DELETE requests are used to request the removal or deletion of a resource on the server
Add an Extension-curl extension Action in an Existing Test Case
Functionize allows you to add a cURL command through the Extension-curl extension Action that you can add to your test case via Quick Add on the Test Detail page and Slider View.
- Go to the Test Details page of the testNote: The Extension-curl extension Action can also be added on the Slider view.
- Hover where you would like to insert the action
- Open the + Insert menu and select Extension
- A dialog box titled Insert Extension will appear, and curl will be selected as the default
- Select Extension: curl-extension
- Select Method from the drop-down
- Enter your cURL command in the Data field
- Enter the API call endpoint in the URL field
- Enter the Header parameters in the Header field
- You will see from your input in the above fields, the Command field is populated automatically
- Click on the Validate button
- In the Expected Response field, you will get what the probable result will be when you run the test case with your code
- Click on the Insert button
- After Execution the response will show under the Extension TAB of the footer of the Slider view
Extension-curl extension Action Examples
The Functionize Extension-curl extension Action has the capability to make GET/POST/PUT/DELETE requests to many APIs. Here are some examples of how to use the Extension-curl extension Action:
- GET RequestIn this example, we are getting a list of projects in an account. The URL and access token for the call can be retrieved from the Functionize API Documentation page found under your Username.//DATA{"accesstoken":"[TOKENID]"}//URLhttps://app.functionize.com/api/v4/project //HEADER{"accept":"application/json"}
- POST RequestIn this example, we generate an access token. Client ID/Secret and URL can be retrieved from the Functionize API Keys and API Documentation page found under your Username.//DATA{"apikey":"[CLIENTID]","secret":"[CLIENTSECRET]","response_type":"json"}//URLhttps://app.functionize.com/api/v4/generateToken//HEADER{"accept":"application/json","Content-Type":"application/x-www-form-urlencoded"}
- PUT RequestIn this example, we are sending a request to edit a Project Environment. Environment ID, URL, and Access Token can be retrieved from the API Documentation page found under your Username.//DATA{"env":"[ID]","url":"[Environment URL]","response_type":"json"}//URLhttps://app.functionize.com/api/v4/project/[Project ID]/env//HEADER{"accept":"application/json","accesstoken":"[tokenID]","Content-Type":"application/x-www-form-urlencoded"}
- DELETE RequestIn this example, we are sending a request to delete a test case. Test Case ID and Access Token can be retrieved from API Documentation page found under your Username.//URLhttps://dev.functionize.com/api/v4/test/[TESTID]//HEADER{"accept":"application/json","accesstoken":"[tokenID]"}
Extension-Postman Collection Action Overview
Postman Collections are groups of saved API requests and related information organized for testing that can be used directly in the Functionize Extension-Postman Collection Action. Postman even allows you to import cURL commands. You can download API tests from Postman and upload them into Functionize.
For more information about Postman, visit this link.
Add an Extension-Postman Collection Action in an Existing Test Case
Functionize allows you to add a Postman Collection through the Extension-Postman Collection Action, which you can include in your test case via Quick Add on the Test Detail page and Slider view.
- Go to the Test Details page of the testNote: The Extension-Postman Collection Action can also be added to the Slider view.
- Hover where you would like to insert the action
- Open the + Insert menu and select Extension
- A dialog box titled Insert Extension will appear, and curl will be selected as default
- Select Extension: Postman Collection
- Select the Collection Type: File or JSON
- File: Allows you to import your JSON file, in which you have your command already
- JSON: Allows you to input your command directly into the field
- Upload your JSON file by clicking on the Collection File field
- Select the Environment Variable Type: File or JSON
- Upload your JSON file by clicking on the Environment Variables File field
- Select the Processing Type: Asynchronous or Synchronous
- Select the Data File Type: File or JSON
- Click on the Insert button
- After execution, click on the View button of the Extension-Postman Collection Action and click on Extensions TAB at the bottom of the footer section on the Slider view
- There you will find the response to your extension
- If the Processing Type is Synchronous:
- If the Processing Type is Asynchronous:
Extension-Postman Collection Action Examples
The Functionize Extension-Postman Collection Action has the capability to make GET/POST/PUT/DELETE API requests directly from Postman in either file or JSON formats. Here are some examples of how to use the Extensions-Postman Collections Action, in these examples we are using Postman Collection files and Environment Variable files to generate a token:
- The file type can be attached to the Collection Type field, where the user can view the Extension execution results on the Slider view at the Extension TAB of the action, and if the action fails after execution, the Response field on the Extension TAB will be blank
Collection file: New Collection.postman_collection.json
{ "info": { "_postman_id": "*******************************************", "name": "New Collection", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "********" }, "item": [ { "name": "New Request", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "apikey", "value": "*********************************", "type": "text" }, { "key": "secret", "value": "*********************************", "type": "text" }, { "key": "response_type", "value": "json", "type": "text" } ] }, "url": { "raw": "https://www1.functionize.com/api/v4/generateToken", "protocol": "https", "host": [ "www1", "functionize", "com" ], "path": [ "api", "v4", "generateToken" ] } }, "response": [] } ] }
- A file type can be attached to the Collection Type and Environment Variable Type field, where the user can view the extension execution result on the Slider view at the Extension TAB of the action and the variable will be passed in Collection File - the Environment Variables File is used with the Collection File for passing Variables to the Collection File
Collection File: Generate token.postman_collection.json
{ "info": { "_postman_id": "************************************", "name": "Generate token", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "********" }, "item": [ { "name": "{{baseurl}}generateToken", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "apikey", "value": "********************************", "type": "text" }, { "key": "secret", "value": "********************************", "type": "text" } ] }, "url": { "raw": "{{baseurl}}generateToken", "host": [ "{{baseurl}}generateToken" ] } }, "response": [] } ] }
Environment Variables File: New Environment.postman_environment.json
{ "id": "************************************", "name": "New Environment", "values": [ { "key": "baseurl", "value": "https://www1.functionize.com/api/v4/", "type": "default", "enabled": true } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2023-10-12T05:41:32.877Z", "_postman_exported_using": "Postman/10.18.10-231005-0655" }
Hover Action
Hover Actions are most often required when dropdown menus do not activate with a left click. The Architect needs to hover over a specific element before clicking on a second element. If the second element only becomes visible on the screen after hovering, the Architect cannot click it until it is visible. Using page coordinates is not an accurate way to achieve this, which is why Hover Actions are preferred.
Create a Hover Action in Architect
- Left-click the Hover button so it is highlighted in blue
- Left-click the element to be hovered on and Hover Action is added to Architect.
Insert a Hover Action in an Existing Test Case
Hover Action can be inserted via the Slider view.
Slider Page
- Open your Test
- Open Slider view via the View Result button or the View button next to any Action
- Click the Quick Add button at the step where you would like to insert the action.
- Open the Insert menu and select Hover.
- Select the Element from the screenshot on which you want to perform the Hover Action
- Click Insert button
Keypress Action Overview
A Keypress Action can be added to your test to simulate using a keyboard shortcut to interact with your site. This could be a single key such as Page Up, or a combination such as Ctrl + Shift + W.
Create a Keypress Action in Architect
- Launch Architect and begin recording your test
- Click the Add (+) icon to open the Architect Actions side panel
- Click Keypress
- Enter the key(s) to be pressed in the Key field, and by default, the Execute keys checkbox is unchecked, check it only if you want to execute the keys at this point in your test during the recording
- Click Add button in Architect Actions side panel
- Click the white circle to the left of the Keypress Action to edit the Action
Add a Keypress Action to an Existing Test
Keypress Actions can be inserted via the Test Detail page and Slider view.
Test Detail Page
- Open the Test
- Hover where you would like to insert the Action
- Click the Add (+) icon where you wish to insert the new Action and select Key
- Select the Key(s) in the dialog box
- The drop-down menu includes each alpha-numeric key, escape key, and arrow keys
- If adding a multiple-key combination, select the necessary additional keys with the checkboxesNote: "Meta" refers to the Windows key in Windows or the Command key in iOS.
- Click Insert
- The new Keypress Action will be visible on the Test Details
- Expand the Keypress action step to see the Action Settings to view the selected Key(s)
Slider View
- Open your Test
- Open Slider view via the View Results button or the View button next to any Action
- Click the Quick Add button at the step where you would like to insert the action.
- Open the Insert menu and select Key
- Select the Key(s) in the dialog box, if adding a multiple-key combination, select the necessary additional keys with the checkboxesNote: "Meta" refers to the Windows key in Windows or the Command key in iOS.
- Click Insert
Not On Page Action Overview
When testing dynamic elements on your site, it's helpful to verify that an item is no longer visible or available to the user. A great tool for testing this type of behavior is the Functionize Not on Page Action in Architect. This can be useful for confirming proper navigation between site pages, pop-up windows, and items like context-based state changes in menus.
Verifying an Element is Not on the Page
- Start a new test with the Architect.
- Determine the element that will be verified as not on the page, such as this cookie banner in the screenshot below, and add a Verify Action for the element
- Open the Action details Architect sidebar panel, for the Verify Action by clicking the white circle to the left of the Verify Action
- Click the ADV Selector tab, copy the path in the Current element field and then close the Action Details Architect sidebar panel
- Continue the flow to dismiss or hide the element, for example, click the Accept button on the banner
- Click the + icon button to open the Architect Actions sidebar panel
- Select Not On Page button
- Enter the path for the element copied from the Verify Action into the Search Selector Expression field and the User also has the option of entering an Attribute, an Operator and the Element Value for a stronger search and click Continue
- Continue recording your test.
- On execution, it will verify that the element is not found on the page
- Sometimes, due to animations or network traffic, the Not on Page Action may occur before the element is no longer on the page - so it can be helpful to add a short Wait Action to ensure that your site is operating as intended
Scroll Action Overview
A Scroll Action can be performed if the website under test has a dynamic loading page, for example, if the site utilizes lazy loading.
Create a Scroll Action in Architect
- Launch Architect and begin recording your test.
- Click the Add (+) icon button to open the Actions panel
- Click Scroll
- Scroll to the desired location on the site
- Click Close
- Your test now includes a Scroll Action
- Click the white circle to the left of the Scroll Action to edit the Action
Insert a Scroll Action in an Existing Test Case
Scroll Actions can be inserted via the Test Detail page and Slider view.
Test Detail Page
- Open your Test
- Hover where you would like to insert the Action
- Open the Insert menu and select Scroll
- Set the X and Y Coordinates for the Scroll Action
- Click Insert
Slider View
- Open your Test
- Open Slider view via the View Results button or the View button next to any Action
- Click the Quick Add button at the step where you would like to insert the action.
- Open the Insert menu and select Scroll
- Set the X and Y Coordinates for the Scroll Action
- Click Insert
SetVariable Action Overview
What is a Variable?
At its most fundamental, a variable is anything that stands in for other data. The variable represents a piece of data that may be altered for various testing reasons. Variables can be substituted for site credentials, order numbers, cookies, and other data.
Variables allow users to deal with data in a flexible and dynamic manner, enabling them to save, change, and retrieve information while a program is running.
The system supports three types of variable scopes:
- Local Variables
- Project Variables
- TDM Variables
Local Variables
- Local variables are only accessible inside the environment of a single test. When you need dynamic data for a test but don't want parallel executions of that or other tests to interfere with the data, this is the most popular sort of variable.
- A local variable is one that is defined and used within a single block of code, such as a function or method, and whose scope is restricted to that block. This signifies that the variable can only be accessed and used within the code block where it is declared. When you leave that block, the variable usually exits the scope and is no longer available.
- Local variables are frequently used within functions and methods to hold temporary data or interim outcomes. They are essential for encapsulating and isolating data within a certain area of code, which helps to avoid name conflicts and makes the code easier to comprehend and maintain.
- Variables are accessed or set as an object named fze.local within expressions.
- For Example: If you want to override text in an input field with a local variable, the input value will be:{{fze.local.yourOverrideVariableName = 'Override Text'}}
Local Variable Action Use Case Scenario
- In this test case, we are verifying a product whose text may change overtime
- So, we put a Set Variable Action below this Verify Action and set it to the Previous Action, so that it takes whatever text the Verify Action in the previous step captured
How to Create a Local Variable
There are 2 ways to create a Local Variable for a Functionize automated test case
- Architect: While recording a new test case
- Quick add: From the Functionize Front-End UI, Test Details page and Slider View
Architect
- Click the Variables button at the bottom of the Architect to open the Variables panel
- Click + Add Variable button to open the Expression Builder, Project Variables that have already been created by you or a teammate within this Project, will be displayed in this panel
- Select the Scope of the Variable to be created: Local will be set by defaultNote: Local Variables are available within a specific test case. When you need dynamic data for a test but don't want parallel executions of that or other tests to interfere with the data, this is the most popular variable scope.
- Enter the Name of your Variable.
- Select the Type of function you will use to help define your variable, in this example, we will use Previous Action for storing the Verify Action value, learn more about the provided Types below.NOTE: Different Variable Types will open subsequent fields to enter or select the necessary information.
- Click Select Step to select the step to retrieve the data from, in this example we have selected Step 2 which will store the Verify Action value from that previous step
- Click Select Step Attribute to select the attribute from the dropdown for the data to store in the Variable, in our example we have selected the Text attribute
- Select the Operator that you want to use, or you can leave the default/blank Operator, learn about the provided Operators below
- The Expression output can be unlocked to customize your expression beyond the default expression, click the Lock icon to edit and click the Unlock icon again once finished to re-lock the Expression
- When your Variable is complete, click Save button in the Add Variable side panel
Quick Add
- From the Test Details page, hover between the Actions and locate the bar with the + symbolFrom the Slider view, Click the Quick Add button at the step where you would like to insert the action.
- To access the Insert drop-down menu, click the Quick Add button
- Choose Set Variable from the Insert dropdown menu
- Choose Local as the Scope
- Choose Static Value or Javascript Expression in the Type drop-downNote: Javascript Expression is used when we want to use test case data and Static Value is simple text input. If fze.iteration is a variable, you can provide a custom iteration. For example - fze.local.loop[fze.iteration].title.
- Click on the Name field, to add a variable name for the Local Variable
- The Expression field is now unlocked, and you may enter a Javascript Expression
- Enter the Javascript Expression in the Expression field and click on the Insert button, in this example, the expression is to save the previous step value
Project Variables
Project Variables are available for all tests in that Project. They are scoped to the Environment of the Project. Variables are accessed or set as an object named fze.project within Expressions.
For Example: if you want to utilize a Project Variable to enter an email address, the input value will be:
{{fze.project.yourEmailVariableName}}
Variable names must not have spaces and must be valid JavaScript names, accessible via the '.' notation for object access.
Project Variable Action Use Case Scenario
- In this test case, we first add a new Set Variable Action labeled as test and entered the value testing
- Then the Input Action enters the Project Variable value in the Search field using the Expression{{fze.project.test}}
How to Create a Project Variable
There are 3 ways to create a Project Variable:
- Architect: While recording a new test case
- Quick Add: From the Functionize Front-End UI, Test Details page and Slider View
- Project Actions menu: Project Variables option
Architect
- Click the Variables button at the bottom of the Architect to open the Variables panel
- Click + Add Variable to open the Expression Builder, Project Variables that have been created by you or a teammate within this Project, will be displayed in this Variables panel
- Enter the Name for your Variable, in this example, we will named it searchCriteria
- Select the Scope of the Variable, in this example, Project Variables are global to the project so any other test may use or modify that variable at any time
- Select the Type of function you will use to help define your variable, in this example, we will use Value for a static number or string, learn about the provided Variable Types hereNOTE: Different variable Types will open subsequent fields to enter or select the necessary information.
- Select an Operator to perform on your data if applicable, in this example, we have selected toUpperCase, which alters our value entered above tripod to TRIPOD as seen in the Result section. Learn about the provided Operators below
- The Expression output can be unlocked to customize your expression beyond the provided Operators, click the Lock icon to edit and click the Unlock icon again once finished to re-lock the Expression
- When your Project Variable is complete, click the Save button on the Add Variable left side panel
Quick Add
- From the Test Details page, hover between the Actions and locate the bar with the
symbolFrom the Slider view, Click the Quick Add button at the step where you would like to insert the action.
- To access the Insert drop-down menu, click the Quick Add button.
- Choose Set Variable from the Insert dropdown menu.
- Choose Project as the Scope
- Choose Static Value or Javascript Expression in the Type drop-down, the Static Value is simple text input and Javascript Expression is used when we want to use test case data, suppose fze.iteration is a Variable then you can input a custom iteration For Example: fze.local.loop[fze.iteration].title.
- Click on the Name dropdown, you can either + Add New Variable or select a pre-existing Variable
- If you click on + Add New Variable, then a field will appear below the Name drop-down where you can enter a unique Variable Name, in this example, we named it testVariable
- Enter the Static Value in the Value field
- Click Insert
Project Variables Window
- On the Test Details page, click on the Project Actions menu > Project Variables
- In the Project Variables modal, you can + Add New Variable, Edit, Delete and Mask existing Project Variables
- To create a new variable, click on the + Add New Variable button
- A new row with blank fields will appear, enter Variable Name and Value
- Click Save
How to Mask Project Variables
A user can Mask Project Variables so that the values are obscured and are not visible anywhere in the Functionize UI. Once the value is masked, then it cannot be unmasked.
Note: Local Variables cannot be masked because it is a technical limitation.
- On the Test Details page, click on the Project Actions menu > Project Variables
- In the Project Variables modal, you can Mask a Project Variable by clicking on the Mask checkbox for any existing listed Project Variable
- Click Save
- Before saving, a Confirmation message will appear giving you a warning - Once a variable is masked, the value cannot be unmasked - you can check the Don’t show this message again checkbox if you don’t want this message to appear again
- Click Confirm to save the changes
TDM Variable
Set Variable TDM Action Overview
What is the TDM Scope of the Set Variable Action?
The TDM Scope of the Set Variable Action allows users to interact with a TDM Data Source and provides various Actions, which include (see details in links below):
- Search
- Add Row
- Add Multiple Rows
- Search and Update Row
- Hash
- Truncate Data Source
- Create New Sheet
It is highly useful when generating reports or when adding or updating rows, deleting complete data, or creating a new sheet in the current TDM Data Source during testing.
How does the TDM Scope of the Set Variable Action work?
It operates through a global extension that interacts with all data sources in the background using the Swagger API. If the user wants to add a row to the dataset, the runtime will pass all data to the extension, which will parse it and ensure that the action type is Add Row. The Swagger API then calls the API for adding the row, and the row gets added to the data source.
A user interface is provided to make these tasks easy for users. This feature is simple to use with the UI and allows the user to interact effortlessly with any data source.
There is 1 way to create a TDM Variable:
- Quick Add: From the Functionize Front-End UI, Test Details page and Slider ViewNote: Quick Add can be done from the Page Object Details page as well, following the same steps from the Test Details page below. Like any other change to a Page Object, when you click the Insert button, a Confirmation modal appears, with the option to click Continue to save the changes to all tests that use this Page Object or Cancel to discard the changesNote: TDM Variables cannot be added from the Architect while recording a new test case.
Quick Add
- From the Test Details page, hover between the Actions and locate the bar with the + symbol. From the Slider view, Click the Quick Add button at the step where you would like to insert the action.
- To access the Insert drop-down menu, click the Quick Add button.
- Select Set Variable from the Insert dropdown menu
- Select TDM as Scope
- Choose any TDM Data Source on the Data Source field
- Choose any one Action type from the drop-down menu
- Finally, click Insert
TDM Variable - Search Action
The SearchAction type in the TDM scope is used when a user wishes to search for a value in a specified column of a TDM Data Source.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Search from the Action drop-down menu
- The Search Parameter section appears, in the Search field select the Column Name for which the Value will be searched
- In the Value field, enter the value to be searched
- The Value Type field can be set to Static Value or Javascript Expression, based on the Search Value being usedFor Example: For Static Value, the user must enter any alphabet or numerical value (i.e. Checkup1).For Example: For Javascript Expression, the user must enter any JavaScript value (fze.iteration).
- If the input value is not in the correct JavaScript format, the user will receive an Invalid Syntax error and the Insert button will not be enabled, making it impossible for the user to save the updates
- When an Action is successfully saved, the TDM tag will be reflected beside the intended action
- After execution, click on the Action's View button which is located to the right of the Set Variable Action, and then move to the Variable tab on the Slider view Footer data
- You can see param response and data response details, and buttons to see full data and/or copy data to clipboard
- You can see param response properly by clicking on the {...} button
- You can see data response properly by clicking on the {...} button
- You can download the current CSV file from the TDM Data Source page and tally the results
- If you search for a wrong value, the tdm response will be blank after execution
TDM Variable - Add Row
Add Row Action type is used when we want to add a new row in a particular column of the TDM Data Source.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Add Row Action type from the drop-down menu
- In the New Row Data sections, add the new data in any/all of the fields
- Click on Insert button
- New Set Variable Action for Add Row is added
- Execute the test case with Headless Run
- Check the TDM Data Source to see the newly added row
TDM Variable - Add Multiple Rows
When a user wants to add multiple rows to specific columns of a TDM Data Source, the Add Multiple Row Action type under the TDM scope is used. This feature is primarily designed for advanced users.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Select Add Multiple Row Action type from the drop-down menu
- On the New Multi Row Data section, hover over the
i
icon to see the Multiple Row Data format - On the Multi Row Data field data the data according to the example data format
- Click on Insert button
- If the input value is not in the correct JavaScript format, you will receive an Invalid Syntax error and the Insert button will not be enabled, making it impossible for the user to save the modifications
- When the Action is successfully saved, the TDM tag will be reflected beside the intended action
- After execution, click on the Action's View button which is located to the right of the Set Variable Action
- On the Slider view, move to the Variable TAB in the Footer data, you can see param response and data response details, and buttons to see full data {...} and/or copy data to clipboard
- You can see param response properly by clicking on the {...} button
- You can see data response properly by clicking on the {...} button
- You can download the current CSV file/Google Sheet from the TDM Data Source page and determine whether the result was correctly inserted or not
TDM Variable - Search and Update Row
Search and Update Row Action type is used when we want to search and update a column of a row in a TDM Data Source.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Search and Update Row Action type from the drop-down menu
- In the Search Parameter section, select any Data Source column in the Search field
- Enter the Value of any row of the selected column, we can select Static Value or Javascript Expression in the drop-down to the right of the Value field
- Under the Update Row Data section, select the Data Source column field you want to update the row data be clicking the checkbox
- Enter the Update Value you want to replace the Current Value with and select Static Value or Javascript Expression from the drop-down field
- Click the Insert button
- The new Set Variable with Search and Update Row Action type will be added to the test case
- Execute the test case with Headless Run
- Check the TDM Data Source to see the newly updated row
TDM Variable - Hash
The Hash Action type is used if the user wants to retrieve data from two columns. For example, if there is a report containing employee data, and you want the contact numbers of employees, you can select the employee name column in the search and the contact number column in the value. This will provide you with the data in TDM response on the Slider view.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Hash Action type from the drop-down menu
- Under the Search Parameter section, select Column header from the drop-down list
- Enter the Value to search for under the selected Column header
- Click the Insert button
- When the Set Variable Action is successfully saved, the TDM tag will be reflected in the Footer of the intended Action
- After execution, click on the Action's View button which is located to the right of the Set Variable Action
- On the Slider view, move to the Variable TAB in the Footer data, you can see param response and data response details, and buttons to see full data {...} and/or copy data to clipboard
- You can see param response properly by clicking on the {...} button
- You can see data response properly by clicking on the {...} button
- You can download the current CSV file/Google Sheet from the TDM Data Source page and determine whether the correct results
TDM Variable - Truncate Data Source
To remove row data from a TDM Data Source, use the Truncate Data Source Action type. It will keep the columns but delete all of the row data.
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Truncate Data Source Action type from the drop-down menu
- Under the Expression section, hover over the icon to see the value to add a Static Value or create a variable using a Custom Expression
- Click Insert button
- When the Action is successfully inserted, the TDM tag will be reflected in the Footer of the intended Action
- After execution, click on the Action's View button located to the right of the Set Variable Action
- On the Slider view, move to the Variable TAB in the Footer data, you can see param response and data response details, and buttons to see full data and/or copy data to clipboard
- You can see param response properly by clicking on the {..} button
- You can see data response properly by clicking on the {..} button
- You can download the current CSV file/Google Sheet from the TDM Data Source page and evaluate the results
TDM Variable - Create New Sheet
The Create New Sheet Action type allows you to add a new worksheet in the Google Sheets Data Source.
Note: This option will only appear if the Data Source is a Google Sheet TDM Data Source
- Open the Set Variable modal from the Quick Add Insert menu, select TDM as the Scope, in the Data Source field select any TDM Data SourceNote: Following the selection of any TDM Google Sheet Data Source, an additional field will appear, allowing you to select the Sheet List on the TDM Google Sheet Data Source. If you pick any other format TDM Data Source, this field will not appear.
- Choose Create New Sheet Action type from the drop-down menu
- Enter the name of the sheet in the Sheet Name field
- Enter the syntax in the Column Headers field as suggested when you hover over the i icon
- Click the Insert button
- The new Set Variable with Create New Sheet Action type will be added to your test
- Execute the test case with Headless Run
- Check the TDM Google Sheet Data Source to see the newly added Sheet
Upload Action
Upload Actions will upload a file to the site under test. This can be used as a file directly attached to the Upload Action or reference a file from a previous Download Action earlier in the test.
Note: We recommend attaching your file via the Actions Tab on the Test Detail page before executing your test. Otherwise, Functionize will fail the Upload Action.
Attaching a file to an Upload Action:
- Open the Test Detail page to the Actions tab
- Expand the Upload Action to view the Action Settings
-
Choose between uploading a file directly to the Upload Action, or uploading from a previous Download Action.
-
Direct File Attachment
- Click the paper clip icon to open your file selector modal
- While uploading and saving files, choose a single file from your local computer, it will upload and attach to your test Upload Action
-
Previous Action File Attachment
- Open the Upload from Step drop-down menu
- Select the corresponding previous Download Action
-
Direct File Attachment
- Once the file is attached, Save the Upload Action
- The test is ready to execute now
Adding multiple files to an Upload Action:
- Go to the Actions tab on the Test Detail page
- Expand the Upload Action to view the Action Settings
- Users can upload multiple files directly to the Upload Action with Direct File Attachment:
- To access your file selection, click the paper clip icon or the Select Files button
- While uploading and saving files, try to choose multiple files from your local computer, all files will be attached to the Upload Action Note: Select multiple files by using the Bulk select option check mark.
- Save the Upload Action after the file has been attached
- The user can now execute the test
- If the user wishes to replace multiple files that were attached after the execution, expand the Upload Action on the Browser TAB and remove the existing files Note: If the current file wasn't removed and the user attempts to attach new files directly, an error message 'Please remove existing file to upload new file' will be shown.
- Save the changes done in the Upload Action
- The user may now re-run the test
Wait Action
Sometimes a test must wait for an on-page event before the next step can execute. For this scenario, Wait Actions can be added to a test case.
Functionize utilizes Smart Waits to optimize your test runs, in which these Smart Waits analyze the network traffic on a page and dynamically wait for the page to load, reducing the likelihood of tests failing due to loading issues. You can add a Smart Wait while creating the test using Architect. This can also be accomplished using Quick Add feature while editing an existing test.
Note: Wait Actions are limited to eight minutes. If a longer wait is required, it is suggested to split the test case into two and execute both test cases using an Orchestration. If that is not viable, please contact the account manager to discuss other available options.
Creating a Wait Action in Architect
- Click the + icon from the main screen of Architect and then select Wait from the action list in the side panel
- Enter your desired Max Wait Time(in milliseconds), which should not exceed two minutes
- Toggle the Smart Wait switch to activate Smart Wait
- Click Add
Inserting a Wait Action in an Existing Test Case
Wait Actions can be inserted via the Test Detail page and Slider view with the Quick Add feature.
Test Detail Page
- View a Test on the Test Detail page
- Locate the + Quick Add icon (only visible on hover) within the test where you would like to insert a Wait Action
- Select Wait from the Insert menu
- Enter the Time(ms), which is in milliseconds, to wait
- Click Insert
Slider Page
- Open your Test
- Open Slider view via the View Results button or the View button next to any Action
- Click the Quick Add button at the step where you would like to insert the action.
- Select Wait from the Insert menu
- Enter the time (ms), which is in milliseconds, for the test to wait
- Click the Insert button