Está en la página 1de 21

COMMON ERROR MESSAGES

IN
SILK TEST

Jagan Mohan Julooru


AGENT NOT RESPONDING

Problem

You get the following error message:

Error: Agent not responding

This error can occur for a number of reasons.

Solution

Try any or all of the following:

• Restart the AUT

• Restart SilkTest

• Restart the Host machine

If you are recording declarations on a very large page and get this error, consider
increasing the AgentTimeout.

CANNOT FIND FILE AGENT16.EXE

Problem

Running a script gives the following error:

Jagan Mohan Julooru


Cannot find file agent16.exe [or one of its components]. Check to ensure the path and
filename are correct and that all required libraries are available.

Solution

• Exit SilkTest (this automatically shuts down the Agent).

• Explicitly start the Agent by itself.

• Restart SilkTest.

CONTROL IS NOT RESPONDING

Problem

You run a script and get the following error:

Error: Control is not responding

This is a catch-all error message. It usually occurs in a Select( ) statement when SilkTest
is trying to select an item from a ListBox, TreeView, ListView, etc.
The error can occur after the actual selection has occurred, or it can occur without the
selection being completed. In general the error means that the object is not responding to
the messages SilkTest is sending in the manner in which it expects.

Solution
Try these things to eliminate the error message:
• If the line of code is inside a Recording block, remove the Recording keyword.

Jagan Mohan Julooru


• Set the following option just before the line causing the error:
Agent.SetOption(OPT_VERIFY_RESPONDING, FALSE)

• If the selection is successful, but you still get the error, try using the Do . . .
except feature.

Unable to start Internet Explorer 5

Problem

While trying to record or run a testcase you get the following message:

Error: Unable to start Internet Explorer 5

This error occurs because the extensions enabled in the Exentions Enabler and
Options/Extensions do not match the Default browser.

Solution

Review the settings for your default browser and make them consistent with the settings
for the host machine in Options/Extensions and for the target machine in the Extension
Enabler.

VARIABLE BROWSER NOT DEFINED

Problem

If you are encountering the following message:

Jagan Mohan Julooru


Error: Variable Browser is not defined

This error occurs because no browser extensions have been enabled.

Solution

Enable at least one browser extension.

VARIABLE NOT DEFINED

Problem

You compile a script and get the message "variable winname not defined" where
winname is the name of a window you have declared in an open include file.

Solution

Make sure that the include file is being used. Just because you have an include file open
does not mean that this is the file being used by the script. The include file the script will
use is either specified in Runtime Options (Use Files field) or by a use statement in the
script.

Window Browser does not define a tag for Microsoft Windows/NT 4.0

Problem

While trying to run or record testcases you get the following message:

Jagan Mohan Julooru


Error: Window Browser does not define a tag for Microsoft Windows/NT 4.0

This error occurs because no default browser has been specified.

Solution

You need to set a default browser. Whenever you record and run testcases, you need to
have a default browser set so SilkTest knows which browser to use. If you didn’t choose
a default browser during SilkTest installation or if want to change the default browser

WINDOW IS NOT ACTIVE

Problem

You run a script and get the following error:

Error: Window 'name' is not active

This error means that the object SilkTest is trying to act on is not active. This message
applies to top-level windows (MainWin, DialogBox, ChildWin).

Solution

You can correct the error by doing one of the following:

• Edit the script and add an explicit SetActive() statement to the window you are
trying to act on just above the line where the error is occurring. An easy way to do
this is to double-click the error in the results file. You will be brought to the line
in the script. Insert a new line above it and add a line ending with the SetAcive
method.

Jagan Mohan Julooru


• Tell SilkTest not to verify that windows are active. There are two ways to do this:

• To turn off the verification globally, uncheck the Verify that windows are active
option on the Verification tab in the Agent Options dialog (select Options/Agent).
• To turn off the option in your script on a case by case basis, add the following
statement to the script, just before the line causing the error:
• Agent.SetOption(OPT_VERIFY_EXPOSED, FALSE)
• Then add the following line just after the line causing the error:
• Agent.SetOption(OPT_VERIFY_EXPOSED, TRUE)
• This means SilkTest will execute the action regardless of whether the window is
active.
• Extend the window time out to be greater than 10 by inserting the Agent -
Window Timeout to >= 10 into your partner.ini.

WINDOW IS NOT ENABLED

Problem
You run a script and get the following error:
Error: Window 'name' is not enabled
This error means that the object that SilkTest is trying to act on is not enabled. This
message applies to controls inside top-level windows (such as PushButton and
CheckBox).

Solution

You can correct this problem in one of two ways.

• If the object is indeed disabled, edit the script and add the actions that will enable
the object.

Jagan Mohan Julooru


• If the object is in fact enabled and you want the script to perform the action, tell
SilkTest not to verify that a window is enabled:

To turn off the verification globally, uncheck the Verify that windows are enabled option
on the Verification tab in the Agent Options dialog (select Options/Agent).
To turn off the option in your script on a case by case basis, add the following statement
to the script, just before the line causing the error:
Agent.SetOption(OPT_VERIFY_ENABLED, FALSE)

Then add the following line just after the line causing the error:
Agent.SetOption(OPT_VERIFY_ENABLED, TRUE)

This means SilkTest will execute the action regardless of whether the window is enabled.

WINDOW IS NOT EXPOSED

Problem

You run a script and get the following error:

Error: Window 'name' is not exposed

Sometimes, applications are written such that windows are hidden to the operating
system, even though they are fully exposed to the user. A running script might generate
an error such as "Window not exposed", even though you can see the window as the
script runs.

Solution

Jagan Mohan Julooru


While it might be tempting to simply turn off the checks for these verifications from the
Agent Options/Verification dialog, the best course of action is to take such errors on a
case by case basis, and only turn off the verification in cases where the window is
genuinely viewable, but SilkTest is getting information from the operating system saying
the object is not visible.

1 Add the following statement to the script, just before the line causing the error:

Agent.SetOption(OPT_VERIFY_EXPOSED, FALSE)

2 Then add the following line just after the line causing the error:

Agent.SetOption(OPT_VERIFY_EXPOSED, TRUE)

This means SilkTest will execute the action regardless of whether it thinks the window is
exposed.

WINDOW NOT FOUND

Problem
You run a script and get the following error:

Error: Window 'name' was not found

This error occurs when the window that SilkTest is trying to perform the action on is not
on the desktop. If you are watching the script run, and at the time the error occurs you can
see the window on the screen, it usually means the tag that was generated is not a correct
tag. This could happen if the application changed from the time the script or include file
was originally created.

Jagan Mohan Julooru


Another possibility is that the window is taking more than the number of seconds
specified for the window timeout.

Solutions

Timing
The window timeout setting is on the Timing tab in the Agent Options dialog (select
Options/Agent). The window timeout is the number of seconds SilkTest will wait for a
window to appear. If the window does not appear within that period, the Window not
found error is raised. If you suspect the problem is that SilkTest is not waiting long
enough, you can increase the window timeout in one of two ways.
You can change the setting in the Agent Options dialog.
You can add this line to the script:

Agent.SetOption (OPT_WINDOW_TIMEOUT, numberOfSeconds)

If the window is on the screen within the amount of time specified in the window
timeout, the problem is the tag for the object.
Tagging
One technique to troubleshoot a tagging problem is the following.

• Go to the Runtime Options dialog (select Options/Runtime) and check both


options in the Debugging section (Print agent calls and Print tags with agent
calls).

• Rerun the script to reproduce the error.

• Select Record/Window Identifier and point to the window.

• Note the tag or identifier.

Jagan Mohan Julooru


• Compare the tag/identifier with what is listed in the results file. What you should
see is a mismatch of what is in the results file versus what you get in the Record
Window Identifier dialog (which is how SilkTest is identifying the window).

Here is an example:
What is in the script:

MainWin("Test Application").DialogBox("CheckBox").SetActive ()

What is in the results file:

MainWin("Test Application").DialogBox("CheckBox").SetActive ()
tag="/[MainWin]Test Application/[DialogBox]CheckBox"
*** Error: Window '[DialogBox]CheckBox' was not found

What is in the Record Window Identifier dialog:

MainWin("Test Application").DialogBox("Check Box")

If you look closely, you can see that the Record Window Identifier dialog is telling us the
actual tag for the DialogBox is Check Box (note the space between Check and Box). But
if you look at the results file, the tag does not show the space. This is the problem.
To correct this problem, change your tag in the frame file (or in the script if you are not
using a frame file).

SILK TEST AGENT CANNOT RECOGNIZE OR INJECT INTO INTERNET


EXPLORER

Problem
During testing on an Internet Explorer 4 or 5 browser, the SilkTest Agent cannot
recognize or inject into the browser.

Jagan Mohan Julooru


Cause
If the browser extensions have been correctly enabled, the problem may be with the
Internet Explorer Internet Options.

Solution
Make sure that your browser extensions have been correctly enabled in SilkTest.

Check the browser’s Internet Options.

• On Internet Explorer 4, select View/Internet Options. On Internet Explorer 5,


select Tools/Internet Options.
• Click the Advanced tab.
• On Internet Explorer 4, put a check (put a checkmark by) Browse in a new
process. On Internet Explorer 5, check (put a checkmark by) Launch Browser
windows in a separate process.
• Click OK.
• Close Internet Explorer.
• Close the SilkTest Agent.
• Start the Agent and browser and run the test again.

Note This Internet option is usually checked automatically. If you find the setting
already has a checkmark, uncheck it, close Internet Explorer, restart Internet Explorer,
and put a checkmark next to the setting again.

CAN'T TEST JAVASCRIPT IN NETSCAPE NAVIGATOR 4

Problem

Jagan Mohan Julooru


You’ve recorded window declarations for a Web application containing JavaScript,
but.when you run your script against Netscape Navigator 4 your testcases fail.

Solution

Turn on the JavaScript option for Netscape Navigator 4 before you record window
declarations.
To turn on the JavaScript option:

• Select Options/Extensions to open the Extensions dialog.


• Select Netscape Navigator 4 in the dialog.
• Click the Extension pushbutton to open the Extension Options dialog.
• Select the Enable JavaScript Always On check box.
• Click OK twice to close the Extension Options dialog and then the Extensions
dialog.

If you turn on the option after you’ve recorded window declarations, you will need to
rerecord your declarations because the HtmlImage and HtmlLink tags will be different.

DefaultBaseState closes the Main window when testing browsers

Problem:
Loading an HTML page in Netscape brings up a second browser containing an ad.
DefaultBaseState () closes the main Netscape browser and leaves the ad open.
DefaultBaseState() closes Browser2 until only one browser remains. If the ad is the active
window , then the main browser will be Browser2 and DefaultBaseState() will try to
close it.

Solution: You may be able to work around the problem by adding the following data
member to Browser:

Jagan Mohan Julooru


lwLeaveOpen = (Browser2)

lwLeaveOpen is part of test frames for client/server applications, but not for browser
applications. However, it will work for browsers; you just need to add it manually as
follows:

[]
[ ] // Construct lwLeaveOpen List, if defined either in Browser or wMainWindow
[+] do
[ ] lwLeaveOpenMain Win = wMainWin.lwLeaveOpen
[+] except
[ ] // lwLeaveOpen not defined for Browser
[]

Discrepancies in how SilkTest records NS4 VO and IE5 VO

Problem:
You are using the VO extension with either Internet Explorer 5.x or Netscape 4.x and
notice slightly different Window ID tags for locations of images and text links that
contain blank spaces.

Solution
for NS4VO seeing one image and IE5VO seeing separate images for expandable nodes,
you can force NS4VO to see separate images by calling:

NavigationTree.SetUserOption ("JoinAdjacentImages", FALSE,


USEROPT_DEFAULT)

Jagan Mohan Julooru


"NavigationTree' is the window identifier for the left-hand frame, i.e., BrowserChild,
containing the tree.
To use a single tag for both IE VO and NS4VO, start with the IE version of the tag.
Replace all instances of '%20' by an asterisk ('*') wildcard character. Then, append an
asterisk at the end to account for the extra characters at the end of the NS4VO form the
tag.

Use the DOMImagesOnly and DOMAnchor user options if you are using Netscape 4.0
with the VO extension and want to recognize text and image links in HTML layers
(<layer> tags).

File not found error when setting the base state

Problem:
SilkTest displays the Error: File not found message when setting the base state.

Solution:
Install your user profile for Netscape Navigator 4.x (versions 4.5 and above) in the
<Netscape Installation Directory>\Users\<User name>\ directory.
Be sure to your <User name> is truncated to 20 characters and that the spaces in the user
name are replaced by underscores.

Jagan Mohan Julooru


HtmlPopupList causes the browser to crash when using IE DOM extension

Problem

Recording or playing back selections against an HtmlPopupList causes the browser to


crash when using the IE DOM extension.
The problem occurs on browser pages that contain JavaScript. It seems to occur more
quickly when recording than when playing back.

Solution
Check the UseDocumentEvents option in the 'extend\domex.ini' and make sure it is set to
FALSE.
This setting lets you specify whether SilkTest captures OnChange events for an
HtmlPopupList in order to determine which item was selected. The default is FALSE.

Links not being recognized

Problem
SilkTest is not seeing your links as HtmlLink objects.

Cause
You have configured your browser not to underline links. SilkTest requires that links be
underlined.

Solution
Reconfigure your browser to display links underlined.

Jagan Mohan Julooru


Mouse Coordinate (x,y) is off the screen

While running the DOM extension, you may receive an error message during playback
saying Mouse Coordinate (x,y) is off the screen.

Clear the following options on the Verification tab of the Options/Agent Options
window:

• Verify that windows are exposed


• Verify that coordinates passed to a method are inside the window

This error message may also indicate that the DOM extension was unable to scroll an
object into view, for example as part of a MoveMouse() call. If that is the case, then set
the DOM extension option UseScrollIntoView
to TRUE.

Recorder does not recognize Internet Explorer

Problem
The SilkTest recorder does not recognize Internet Explorer versions earlier than 5.01.
SilkTest recognizes the browser incorrectly as a client/server application and as a
dialogbox as opposed to a MainWin.

Cause
The registry key BrowseNewProcess specifies whether a new process is created for each
instance of Internet Explorer. If the entry for this key is not "yes", all instances of Internet
Explorer and Windows Explorer that you start are run in the same process. As a result,
the Recorder may not be able to hook into IE correctly.

Jagan Mohan Julooru


Solution
Change the BrowseNewProcess registry key by:

• Open Internet Explorer, then click Tools/Internet Options and select the
Advanced tab.
• Check the Launch browser windows in a separate process option, then click OK
to save this option.
• We strongly suggest that you then verify that the registry key is set correctly:
• Open your Registry Editor by clicking Start/Run and entering regedit.
• Expand the registry key
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explor
er/BrowseNewProcess.
• Right click BrowseNewProcess.
• Select Modify and check that the value is "yes".
• Repeat Steps 3 and 4 for the registry key
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Expl
orer/BrowseNewProcess.

SilkTest cannot verify browser extension settings

Problem
SilkTest is not able to verify extension settings for a Web application running in Internet
Explorer.

Cause
Your browser’s third-party extensions are not enabled.

Solution
Enable third-party browser extensions:

Jagan Mohan Julooru


• On the Tools menu in Internet Explorer, click Internet Options.
• Click the Advanced tab.
• Under Browsing, select the Enable third-party browser extensions (requires
restart) check box, then click OK.

Note: in order for the new setting to take effect, you must restart your browser by
closing and reopening the browser window.

SilkTest does not recognize text such as input fields or buttons if the <form> tag is
not properly nested

Problem
While using Internet Explorer with the DOM extension, SilkTest recognizes static HTML
text and tables on a page, but does not recognize text such as HTML fields or HTML
buttons.

Cause
You may have improperly nested <form> tags, such as the following:

<table>
...
<form>
</table>
<table>
...
</table>
</form>

In the example above, SilkTest does not recognize the second table.

Jagan Mohan Julooru


Solution
There are three options:

· Use the VO extension to record the page.


· If you want to continue to use the DOM extension, check that your HTML tags
are properly nested, for example:
<table>
..
</table>
<form>
<table>
...
</table>
</form>

or

<form>
<table>
...
</table>
<table>
</table>

· Set the table recognition value to 0. This means that SilkTest ignores the table and
cell, but it will recognize the other input elements.

Jagan Mohan Julooru


My browser doesn't work after I use SilkPerformer recorder

Problem
You've finished generating .bdf files with SilkTest's SilkPerformer recorder, but now
your browser doesn't work in the normal fashion.

Solution
When you use the SilkPerformer recorder, you have to set up your browser to use a proxy
server, with localhost
as the address and 8080 as the port number. Once you've finished recording, you must
reconfigure your browser -- Netscape Navigator, Internet Explorer 3 and 4, or Internet
Explorer 5 -- to its original settings.

Jagan Mohan Julooru