Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

What causes the syntax error "{" when switching a SilkTest testcase from "Visual 4Test" to "Classic"

What causes the syntax error "{" when switching a SilkTest testcase from "Visual 4Test" to "Classic"

This error occurs if one of the lines (while open in Visual 4Test) is accidentally indented one too many times then, when trying to run it as a Classic 4Test script, it comes up with a syntax error "{"

When Visual 4Test is compiled as Classic, all the indentations are represented as closed and open brackets "{ }". Classic 4Test is much more rigid in its compilation of these objects and while Visual 4Test will work with extra indentation, Classic 4Test can"t run until the brackets are removed.

Example 1:

This is an excerpt of the first few lines of an include file when seen as Classic 4Test:

const wMainWin = AboutBlank;

window BrowserChild AboutBlank
{
      tag "about:blank";
      // The URL of this page;
      const sLocation = "about:blank";
      ..........etc.....
}


Example 2:

This is an example of what happens when any line is accidentally indented once too many times while in Visual 4Test. It then will not compile in Classic 4Test and we have 2 extra brackets added.

const wMainWin = AboutBlank;
 
window BrowserChild AboutBlank
{
      {                                                                                     

When this is compiled a syntax error is generated, click to the far left of this error so that it brings you to the correct line, then delete the extra brackets closest to this line and recompile, everything should compile properly now.

Old KB# 22644

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:33
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.