What is Code Folding

Code folding is the ability to expand and collapse certain code in programming constructs. This improves readability when a test script contains numerous functions or other blocks of code and comments that you want to hide when you are not currently working with that part of the file.

How to Expand and Collapse Code in Squish

You can collapse and expand code fragments in Squish so that you can view different sections of your test script without having to use the scrollbar.

To expand or collapse code, click the plus or minus sign that appears to the left in the test script editor.

To expand or collapse all of the code, place your cursor anywhere within the test script, right-click, and then select “Expand All” or “Collapse All“.

Code Folding - Expand and Collapse Code in Squish
Example of expanding and collapsing Code in Squish (click to enlarge)

View Folded Code in a Tooltip

You can view code that is currently folded by positioning the mouse pointer over the plus sign or functions name. The code appears in a tooltip as you can see below.

Squish GUI Tester - View Folded Code in a Tooltip
Tooltip example to view folded code (click to enlarge)


1 Comment

Hi Elias, thanks for the tip!
Do you have an idea on how to configure squish so that every time I open a file, it’s ALL_expanded by default, cause with python, block comments are always collapsed on file opening, and it bothers me a bit since I “open them to read them”, obviously…
Thank you !

Leave a Reply

Your email address will not be published. Required fields are marked *

Copy link
Powered by Social Snap