Basics of automating scenarios
Automating a scenario in KR is essentially adding actions, either through recording or manually.
Automate your first scenario
1/ Start recording
Once the extension is opened, open https://www.airbnb.com/ to automate booking a place to stay. Minimize and position the window in a way that allows you to see what's going on with KR. Click on the button with the red circle to start a recording session.
Start interacting with the website. Perform any activity like you would normally do. The interactions will be recorded in KR.
2/ Use context menu to add actions
Right-clicking on any element, select Katalon Recorder (Selenium tests generator) > waitForElementPresent. This adds the step waitForElementPresent with the value being the locator of the selected element.
3/ Rename your test for better readability
Click on the Stop button.Rename your test case by right clicking on the test case and choose Rename Test Case.
4/ Save your test case/test suite
Right click on the Test Suite and choose Save Test Suite as, KR will save your test suite, along with the test cases, into a HTML file.
Add actions to a scenario
After recording a scenario, you may choose to extend it by adding actions manually.
1/ Add a new step
Click on the button with the Plus icon.
2/ Specify an action
Click on the down arrow next to the command input and choose a desired action.
3/ Read how to use the action & parameters
Click on Reference tab at the bottom panel. Then click on each action to see the documentation.
From 5.3.31, users can quickly save changes made to test cases via shortcuts
ctrl + s or right-click on a test case and choose Save Test Case.
From 5.3.31, KR implement some UX enhancements to help users more aware before removing data.
Specifically, the following operations are changed from:
- Remove test case to Remove Test Case from Workspace.
- Close Test Suite to Remove Test Suite from Workspace.
- Close All Test Suites to to Remove all Test Suites from Workspace.
- Save Test Suite as to Save Test Suite to Computer.
Remove Test Suite from Workspace
Remove Test Case from Workspace
Ideally, your changes should be persisted to a permanent storage. However, due to web extension's limitations, we cannot store your test cases and test suites directly to OS.
By default, changes made to your tests will be stored into a browser storage dedicated to KR. As long as you have KR installed in your browser, your data will be safe. But when you uninstall KR, your data will be deleted. This is why we implement certain UX enhancements that will help you be extra cautious before you do anything that may cause permanent data loss.