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

Are there any recommendations to follow when updating GUI Specifiers for use with SilkTest 8.0 and above?

Are there any recommendations to follow when updating GUI Specifiers for use with SilkTest 8.0 and above?

Updating your automation to use only the specifiers supported by SilkTest 8.0 will require you to search through your frame files (.inc), test scripts (.t) and testplan files (.pln), and manually delete or replace specifiers and associated code.

  • When searching testplan files, please keep in mind that you do not necessarily need to modify testplan attributes and queries that relate to platforms or browsers, although you may want to. You only need to modify GUI or browser specifiers that are used as symbol values or as testcase parameters.

  • You can either manually search the files for obsolete specifiers, or you can use the compiler to detect obsolete specifiers. The SilkTest compiler will see obsolete specifiers as undefined keywords, so compiling automation that uses those specifiers will lead to a sequence of syntax errors. The Syntax error messages will usually mention the undefined specifier, although in some cases it may mention tag or another keyword that is prefaced by an undefined specifier. The disadvantages of using the compiler are:
    • Several passes may be required because the compiler will not detect errors in a block of code that sits within a statement that contains an error. For example, if an if or else expression contains an error, then errors will not be detected within the statements for the if or else actions.
    • If you remove a line (or lines) of code, then finding subsequent compiler errors (e.g, by using the F4 shortcut key) may take you to the wrong line of code because of the offset caused by removing earlier code.
    • The compiler will not detect instances of GUI or browser specifier names, or specifiers that have been converted to strings (e.g., via the @ operator).

  • Whether you manually search for obsolete specifiers or use the compiler to detect them, you should not simply find and replace them. Instead, you should analyze the code containing the specifier. If a specifier is part of a list for a single line of code that also contains valid specifiers, then you could simply delete or replace the obsolete specifier(s). For example, in the line:
    [ ] explorer5_DOM, explorer6_DOM tag "The caption for IE"
    

    You could just delete explorer5_DOM. However, it would be better to either eliminate the browser specifiers or, if you need one because the DOM extension for another browser has a different tag, then replace explorer6_DOM by explorer. If the line of code contains only obsolete specifiers, then you should just delete the entire line.

  • In many cases, GUI or browser specifiers will be used with a single line of code, such as a tag in a window declaration. However, blocks of code in testcases, functions or methods may also use GUI or browser specifiers. Usually such blocks of code will contain conditional expressions that test the result of a function that returns a specifier, such as GetGuiType(), GetBrowserType(), GetDefaultBrowserType() or GetBrowserTypeName(). If a block of code refers only to obsolete specifiers, then you should delete that block of code, and make the necessary adjustments to the conditional (or branching) statement (e.g., if..else, switch).

  • The following table lists general guidelines for eliminating or replacing obsolete GUI and browser specifiers. As explained above, deleting the specifier may require deleting the entire line of code, or deleting or modifying the associated block of code.

Obsolete Specifiers

Mac, msw95, mswdos, mswnt35, mswnt40, oimsw, oint, oix, oi, pm, galaxy95, galaxyMSW, galaxyNT35, galaxyNT35, galaxyX, galaxyNT, galaxy

Delete (along with associated code)



explorer3, explorer4, explorer5, explorer5_DOM, explorer6, explorer4_or_5, explorer4up, netscape3, netscape4, netscape6_DOM, premozilla, netscape6s

Delete (along with associated code)



AOL7_IE

Replace by AOL_IE


explorer6_DOM

If it is known that different code is needed for other versions of Internet Explorer, then keep it

If it is known that different code is needed for Internet Explorer versus other browsers, then replace by specifier: explorer

Otherwise, eliminate the browser specifier (but keep the associated code)



explorer5s

If it is known that different code is needed for Internet Explorer versus other browsers, then replace by specifier: explorer

Otherwise, eliminate the browser specifier (but keep the associated code)



netscape7_DOM

If it is known that different code will be needed for other versions of Netscape, then keep it

If it is known that different code is needed for Netscape versus other browsers, then replace by specifier: netscape

Otherwise, eliminate the browser specifier (but keep the associated code)



netscape4x

If it is known that different code is needed for Netscape versus other browsers, then replace by specifier: netscape

Otherwise, eliminate the browser specifier (but keep the associated code)



netscape7s

If it refers to something specific to the Netscape 7 browser chrome, then replace by specifier: netscape7_DOM

Otherwise, replace by specifier: netscape

Old KB# 20953

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:15
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.