We are building Ranorex Webtestit to speed you up. The project tree is a great tool to browse your project’s files, but for some workflows, it is not ideal. In this article, we will show you more ways to work with files.
Note: All keyboard shortcuts specified in this article assume the default settings. Keybindings can be changed via
Help → Keyboard shortcuts.
The Quick Open bar
In the previous article we talked about the F1 Quick Command bar. The Quick Open bar is similar in concept and can be activated using
⌘P on Mac).
You will see all project files listed, grouped by their type, and then sorted alphabetically. Type something to apply a filter.
Enter confirms your choice and the selected file will be opened.
Go forward/go back
Working on two or three files at the same time? There are keyboard shortcuts you can use to quickly navigate forward and backward between your last used files:
Go to definition
Got the cursor on a variable, function or another reference, that is defined in another file? With
F12 that file will open and put the cursor at the relevant spot. Combine with “Go back” to take a deep-dive into your code. This action is also available via the context menu or the F1 Quick Command bar.
Creating new files
As a normal part of your workflow, you will often create new files, especially Page Object files and Test files. While you can create new files via the project tree, you can also do it with keyboard shortcuts.
⌘N → ⌘Pon Mac) creates a new Page Object file
⌘N → ⌘Ton Mac) creates a new Test file
⌘N → ⌘Con Mac) creates a new class file
Here is a short example on the above mentioned keyboard shortcuts
Additionally, in a typical “think it and it’s done” manner, you can use the Quick Fix (
Ctrl+. or on Mac
⌘.) “Create new page object file” with the cursor on an unknown variable to create a new Page Object class with that name.
After reading this article, you know how to navigate between files most efficiently, and even how to create new ones, with nothing but your keyboard.
Want to improve your game inside the code editor? Continue on to part three. Working with the Keyboard - Snippets.
And if you haven’t already, check out part one, Working with the Keyboard - Actions, to learn about the F1 Quick Command bar and customizing your keyboard shortcuts.