This functionality is supported only if you are using the Classic Agent.
There are three different ways to set options for the DOM extension.
- In the
DOM Extensions dialog box.
- By using
BrowserPage.SetUserOption() in a script.
- By editing the values in the
[Options] section of the
domex.ini file.
Depending on where you set the option, the option can be set globally, or turned on and off at various points of your testing.
Setting an option in
domex.ini or in the
DOM Extensions dialog box sets it globally. However, if you want to set the option only at certain points in your script, use
BrowserPage.SetUserOption() as described in
SetUserOption().
Regardless of how an option is set, you can read its value by using
GetUserOption().
Options you can set in
domex.ini
To set these options, you enter them on a line in the
[Options] section of
domex.ini, for example:
ScrollListItemIntoView=FALSE
You can set the following options in
domex.ini, but you cannot set them with
SetUserOption():
- DOMWaitForBrowser
- Default is 10000 milliseconds (or 10 seconds). The value you set is expressed in milliseconds. This option specifies how long
Silk Test Classic will wait for the browser to complete an action. If the browser fails to respond within the given time,
Silk Test Classic will try to force a ready-state. If this fails too, an error will occur.
- IgnoreDivTags
- Default is FALSE. If HTML controls nested between the
<DIV> and
<\DIV> tags are not recognized, set this option to TRUE to ignore the
<DIV> and
<\DIV> tags.
- ReturnListContentsPropertyAsString
- Default is FALSE meaning that normally the
$Contents property for
HtmlList objects returns a LIST OF STRING. Set this option to TRUE if you want
$Contents to return a STRING for
HtmlList objects.
- SetActiveXBrowserStateActive
- Default is FALSE. Set this option to TRUE, if
Silk Test Classic does not recognize the properties and methods of an ActiveX control in the browser. Setting the option to TRUE forces the DOM extension to behave as if the browser is ready when recognizing the ActiveX control, even though the browser
Document complete message was not received.
- ScrollListItemIntoView
- Default is TRUE. Set this option to FALSE to avoid scrolling a list box item or
PopupList item into view before selecting it.
- ShowHTCViewlink
- Default is FALSE. Set this option to TRUE to allow the DOM extension to look for HTC ViewLinks. Setting this option to TRUE slows performance for recording and playback.
- UseDocumentEvents
- Default is FALSE. For more information, see
HtmlPopupList Causes the Browser to Crash when Using IE DOM Extension.
- XMLNodeNamingVersion
- Default is 0. For more information, see
XMLNode Class.
Options that you can set in domex.ini and through SetUserOption
To set the following options, you can edit
domex.ini or you can use
SetUserOption():
- IgnoreSpanTags
- Default is FALSE. If
Silk Test Classic recognizes multiple text objects as one
HtmlText object and the object is a SPAN object that is parented to a SPAN object, set this option to TRUE to ignore the <SPAN> and <\SPAN> tags.
- RowTextIncludesEmptyCells
- Controls the recognition of blank cells in bordered and borderless tables. This option is set to FALSE by default. If you want to return blank cells in tables as empty strings, set this option to TRUE.
- ShowBodyText
- Default is FALSE meaning that the DOM extension does not record
BodyText objects, which are text that is not contained within an HTML tag. In previous releases body text displayed as
HtmlText. Set this option to TRUE if you do want the DOM extension to record
BodyText objects. We suggest keeping this option set to FALSE for improved performance, particularly when recording window declarations on large pages. You can also set this option on the DOM Extensions dialog box.
- ShowBorderlessTableFlags
- Indicates input elements that you do not want
Silk Test Classic to consider as input elements; for details, see
Overview of Input Elements and Borderless Tables.
- ShowBorderlessTables
- Default is .5 meaning that the DOM extension does record
BorderlessTable objects. However, .76 is the threshold where
Silk Test Classic starts to recognize more objects within tables, such as images, hidden text, check boxes, text fields, and buttons. Set this option to .76 or greater if you want the DOM extension to record
BorderlessTable objects. You can also set this option on the DOM Extensions dialog box.
- ShowHtmlForm
- Default is FALSE meaning that the DOM extension does not record Form objects. Set this option to TRUE if you do want the DOM extension to record Form objects. You can also set this option on the DOM Extensions dialog box.
- ShowInvisible
- Default is TRUE, meaning that invisible objects are recorded. This option lets you control whether or not invisible objects are recorded by the DOM extension. If your browser-based application consists of pages that contain many invisible objects that you do not need to test, then you can improve performance by setting the option to FALSE in order to ignore all invisible objects. You can also set this option on the
DOM Extensions dialog box.
- ShowHtmlHidden
- Default is TRUE meaning that the DOM extension records Hidden objects. Set this option to FALSE if you do not want the DOM extension to record Hidden objects. You can also set this option on the
DOM Extensions dialog box.
- ShowHtmlMeta
- Default is TRUE meaning that the DOM extension records Meta objects. Set this option to FALSE if you do not want the DOM extension to record Meta objects. You can also set this option on the
DOM Extensions dialog box.
- ShowHtmlTable
- default is TRUE meaning that the DOM extension records
HtmlTable objects. Set this option to FALSE if you do not want the DOM extension to record
HtmlTable objects. You can also set this option on the
DOM Extensions dialog box.
- ShowHtmlText
- Default is TRUE meaning that the DOM extension records Text objects. Set this option to FALSE if you do not want the DOM extension to record Text objects. You can also set this option on the DOM Extensions dialog. If you are testing a transaction type page with lots of text consider not recording Text objects. This prevents
Silk Test Classic from recording the many text objects, which helps your declarations to be clean. If, on the other hand, you're looking for formatting and styles of text objects, you'll want to select this option.
- ShowListItem
- Default is TRUE. Set this option to FALSE if you do not want to show the text contained within
HtmlList controls in your browser. If mouse events are associated with your list items, set this option to TRUE so
Silk Test Classic can interact with the list items. When set in the
domex.ini file or
DOM Extensions dialog box, this setting is global. However, if you want to set this option for only certain points in your script, use
BrowserPage.SetUserOption() as described in
SetUserOption().
- ShowOverflow
- Default is TRUE meaning that
Silk Test Classic recognizes elements with overflow styles. These elements are very similar to IFrame elements in that they have their own scrollbar and can contain their own elements. Set this option to FALSE if you want
Silk Test Classic to ignore elements with overflow styles; this means that
Silk Test Classic may not interact with the elements contained by this overflow element.
- ShowVirtualColumns
- Default is FALSE. Affects how the DOM extension records asymmetric tables. These are tables that use either column span or row span attributes, or tables whose rows don't have the same number of columns. An example of an asymmetric table is a typical calendar page that has the month of January written across the top row and the seven days of the week in seven columns across the second row. We recommend that you check this box if you are working with tables that have asymmetrical rows. Check this check box if you want
Silk Test Classic to create virtual columns for any row in a table. In the example below, it causes the top row to contain one real column for
January, followed by six virtual columns which are blank. These virtual columns appear where there are none in order to complete the table and they are named virtual1, virtual2, and so on. These virtual columns cause the table to be symmetrical. Uncheck this check box to avoid creating virtual columns. This causes
Silk Test Classic to record the top row as the name for first column. This occurs because there is no second column in the top row; Mon is promoted to the name of the second column, and so on. You can also set this option on the
DOM Extensions dialog box.
January
Sun Mon Tues Weds Thurs Fri Sat
- SearchWholeDOMTree
- Default is FALSE. This check box determines how windows declarations are found. If this value is set to TRUE, when recording window declarations, the search algorithm of current objects searches the whole DOM tree.
- ShowXML
- Default is TRUE meaning that the DOM extension records XML objects. Set this option to FALSE if you do not want the DOM extension to record XML objects. You can also set this option on the
DOM Extensions dialog box.
- UseBrowserClosestText
- Default is FALSE. Determines how the DOM extension finds the closest static text for HtmlTable, HtmlLink-text, HtmlColumn, HtmlLink-image, HtmlImage, HtmlHeading, HtmlText, HtmlRadioList, and HtmlPushbutton. Check this check box if you want
Silk Test Classic to use the DOM extension to find the closest static text for the objects listed above. This does not apply to invisible objects such as XML, Meta, and Hidden; those objects do not rely on any text on a page and so it would be meaningless to try to associate them with any objects. Uncheck this check box if you want to use the Agent to determine closest static text for the objects listed above. You can also set this option on the
DOM Extensions dialog box.
- UseOverflowScrolling
- Default is FALSE. Set this option to TRUE if off-screen HTML elements with overflow do not scroll into view properly.
- UseScrollIntoView
- Default is FALSE. This option is useful if you are having problems scrolling objects into view. This sometimes happens on HTML pages that contain scrollable iframes or scrollable HTCs. In general, the action/testcase recorder does not record the content inside an HTC. For other nested scrollable objects such as IFrames and overflow elements, the flashing rectangle displays in the wrong place, but the action/testcase recorder does generate correct script actions. If you are having problems playing back actions against nested scrollable objects, then set UseScrollIntoView to TRUE. Setting this option to TRUE helps avoid getting nested scrollable objects into view.
Note: API-based clicking is not affected by the value of this option.