Quickdrawer – How to automate your test

The quick drawer is your tool to create your test cases, page actions or step definitions. It holds every action that JOSF can execute, including your own page actions, API requests and data storages. This enables you to drag your steps and page actions into your test case or to structure it by adding groups.
Test steps
From the test steps view, you can drag in new groups to structure your test case or to influence the test flow with conditional groups.
Predefined actions
In this section, all the stock and custom actions are shown in the action speed-dial. By default, the Web browser actions are active, but you can switch to the API verifications via the select box.
All these actions can be dragged into your test at any point. Each action will have sub actions and options to configure them to your situation, but are configured to accommodate most use-cases.
User defined actions
In here, you can navigate through your own created Pages, APIs and Data storages to view and add these to your test.
Simply open any of the items and drag them into your test!
Copied steps and groups
If you have copied a step or a group, another option will show up between the predefined actions and the user defined actions called Copied item from where you can drag the item into your test.

Test objects
The second part of the quick drawer, focusses more around objects. These could be objects that are scanned via the Page Scanner, or previously stored objects via the Page Objects tab.
Page scanner
The page scanner is capable of scanning the current web browser, opened by JOSF. You can filter on object types like Clickables, Writables or Readables or toggle on the advances mode and filter on specific HTML elements.
Each Scan result will preview the found object, and presents the possible location strategies, accompanied by the number of found elements when using that strategy (lower is better). Press the eye-icon to highlight the element using that strategy.

You can drag each strategy and place them in your test either as a new step, or on top of a step to apply the strategy. When placing a strategy as a new step, JOSF will prompt you what to do with it by showing the action speed-dial.

Predefined actions
There are five predefined action packs available out-of-the-box with JOSF. The Web browser-, database- and the API call actions. Predefined actions contain sub actions and can be configured with options. For example; the Keyboard action has a type text sub action and by selecting the gearbox, you can select some extra options like clearing the field before typing or setting an interval between keystrokes.

Next to the action, sub action and options, each action also has an Object and a Data field. Most of the times the Object field contains a location strategy to select an object in the web browser and the Data field holds the data that is required. In the example above, the Object has the name=my-text locator while the Data holds the Hello World text. In this action’s case, this means that JOSF will type the text Hello World in the object found by that locator.
Note that with some actions, the object and data field are used differently. Make sure you read about an action to understand how it works!
