Troubleshooting functional tests
This topic can help you troubleshoot some of the problems that you might encounter in functional tests.
For information about troubleshooting functional tests in Google Chrome browsers, see Troubleshooting functional tests in the Google Chrome browser.
Problem | Description | Solution |
---|---|---|
On Linux, when you either run the recorded scripts or insert objects to the scripts for the Eclipse application in HCL OneTest™ UI, the scripts fail and display the ObjectNotFound Exception error. |
There is a mismatch in the GTK version between HCL OneTest™ UI and the Eclipse application that is under test. |
To record a test script or insert objects to the recorded script on Linux, you
must perform the following steps:
|
After you record functional tests on a web application by using the Chrome browser, when you highlight the test objects, the objects are not highlighted in the application under test. |
When you select any object from the Test Object Map window, the test object is not highlighted in the application under test. The following error message is displayed: The <Object name> could not be highlighted. |
You must place the Test Object Map window in front of the Chrome browser window. Because the application under test is in focus, the objects are highlighted correctly. |
On Linux, when you play back the compound test that contains functional tests, the playback does not start. |
Soon after you install HCL OneTest™ UI on your computer, if you playback the compound test that contains functional tests, the playback does not start. The error log displays the code generation error because of the null pointer exception. This is because the environment variable did not take effect after the installation of HCL OneTest™ UI. |
You must perform the following tasks:
|
When you play back functional tests by using the Chrome or Edge browsers, the playback fails. |
When you play back functional tests in the Web UI method by using the Chrome or
Edge browsers, the browser does not start and the playback fails.
Note: The Web UI
method of the playback is enabled by performing the following:
The Web UI method of playback requires the latest drivers for the Chrome or Edge browsers. If the latest drivers are not found, then the playback fails. |
You must perform the following actions:
|
ObjectNotFoundException exceptions occur while inserting a verification point on ErrorProvider, HelpProvider and ToolTipText controls in .Net. |
This occurs if you create a data verification point on ErrorProvider, HelpProvider and ToolTipText controls while recording in .Net. |
In .NET, create properties verification points on these controls. |
System.NullReferenceException occurs while playing back a data-driven script that contains calendar controls in SAP applications. |
You might have closed the calendar control after recording a data-driven script, in which case a close() event is generated in the script. The script will look similar to the following example: calendar_sapCalendarControl1().setDate(dpString("SAPCalendarControl1"));
dialog_calendar().close(); Because the setDate() method sets the focused date and also closes the calendar control, the script will fail during playback while trying to close the calendar control. |
Perform either of the following tasks:
|
Playback fails while performing data verification on controls like text, ComboBox, or Tree in SAP applications. |
This occurs if the verification point method is recorded before the methods like set for text/combo box or ExpandNode/doubleClickNode for a tree control. |
Perform either of the following tasks:
|
A Java™ application-under-test (AUT) does not open while configuring the application for testing in HCL OneTest™ UI. |
The AUT does not open while configuring the application for testing if you specify a lower version of JRE than the JRE version that was used to compile the test application. |
|
Playback fails while testing SAP applications that contains password fields. |
HCL OneTest™ UI records the entered password as it appears in the password field and is not able to read the encrypted value. |
Before playing back the script, replace the recorded password with the actual password in the script. |
HCL OneTest™ UI context sensitive help does not work on VS .Net IDE. |
Install the MSDN library. During installation, select options to integrate the MSDN library with the VS .Net IDE for the HCL OneTest™ UI context sensitive help to work. |
|
When you try to open a PDF file from the Tutorial Gallery, the computer hangs. |
If you are using Adobe® Reader 6.0.0, opening a PDF file from the Tutorial Gallery might cause your computer to hang. |
Other versions of Adobe Reader do not cause this problem. Free upgrades to the latest level of Adobe Reader are available from the Adobe web site. |
Multimedia user assistance does not appear. |
Multimedia user assistance, such as Tours, Tutorials, and Show me viewlets require the Flash player to be installed on your computer. |
Install Flash Player version 6.0 or newer from the Adobe web site. |
Disabling the support for playback on Eclipse when views and editors are dragged or undocked after recording. |
Add the statement |
|
Script that are recorded in one browser fail to play back in another browser. |
A script recorded in Internet Explorer, for example sometimes fails to playback in Mozilla Firefox. |
Inspect the DOM structure of the objects in the browsers. For example, you can use the DomInspector for Mozilla Firefox. Similarly, DOM Structure can be interpreted for other Browsers as well. Then you can compare and check whether the object hierarchy is same.
|
Record and playback does not work on browser menu options |
HCL OneTest™ UI supports testing the browser content but not interactions with the browser menu options or the browser itself. This is done mainly to provide cross-browser record and playback facility for testing HTML applications. |
Capture the browser object and use the inputKeys method to interact with the menu options using the keyboard shortcuts for the specific menu options. For example, the Close option in the File menu can be accessed using the shortcut key Alt+F+C. If you need to access this option, then you can use the inputKeys method on the browser object, providing the shortcut key ("%fc") as an input parameter as shown below:
|
Internal SAP error (ABAP) during recording |
While recording against SAP applications, sometimes SAP scripting framework internally throws some ABAP errors and recording stops. The problem will not get fixed unless SAP fixes it in their scripting framework. |
Disable modal search help on the system for the user that runs the script. You can do this in the Preferences dialog in the SAP GUI, from the help menu. If this solution does not work, you may have to restart your SAP application |
System.NullReferenceException occurs while playing back a data-driven script, which contains calendar controls in SAP applications. |
You may have closed the calendar control after recording a data-driven script and hence a close() event is generated in the script. The script will look like: Since the setDate() method sets the focused date and also closes the calendar control the script will fail during playback while trying to close the calendar control. |
Delete the calendar close method that was generated in the script. |
In Linux®, calling the RationalTestScript API commands from multiple threads causes asynchronous errors. |
When two threads in a process submit X requests simultaneously, the X libraries cannot handle the requests because they are not thread-safe. This causes asynchronous errors with messages like Unexpected asynchronous reply or Event lost to occur. This may also occur when multiple threads are used in functional test scripts. |
In the ivory.properties file, set the option rational.test.ft.script.playback.mouse.allow_multiple_threads to "true." |
Encoding problems while importing files on Linux. |
On Linux, due to incompatible encoding formats, HCL OneTest™ UI may not recognise or read the files that are being imported. In HCL OneTest™ UI the default encoding format is set to UTF-8. But UTF-8 cannot handle a few encoding formats like Cp1252. |
On Linux, set the encoding format of the files to ISO-8859-1:
|
Unable to play back .Net scripts stored in the network. |
The project in the network may not have Full Trust permission in the local computer due to its security policy. A RuntimeSecurityPolicyException message is displayed in the playback log or in the debug log. |
Perform the following:
|
Unable to resolve resource bundle |
If Flex Builder 2 is used to build a Flex application with the HCL OneTest™ UI adapter, you might get an error on resource bundling. |
Copy
automation_agent_rb.swc from the ../Flex
automation/frameworks/locale/en_US to ../Flex SDK
2/frameworks/locale/en_US directory.Note: This is not required if
Flex Builder 3 is used. |
ObjectNotFound exception occurs while playing back the script if the Java AUT is hidden behind another application window | Perform the following:
|
|
Unable to record double byte character sets (DBCS) | When typing double byte characters, the same key sequence might have multiple DBCS characters. The Input Method Editor (IME) provides the option of selecting the character that you want when you press the space bar after a key sequence. | Press Enter to record the input string. |
HCL OneTest™ UI does not record the actions with the Flex applications. | This occurs if the Flex environment and the application are not configured correctly. | Ensure that:
|
ObjectNotFound exception occurs during script playback and the
exception message indicates that the object state is incorrect. For example:
|
During playback, HCL OneTest™
UI expects one of the
following state for a test object:
|
To override the exception, set the anchor of the object to null
or ANY. For example: Replace |
HCL OneTest™ UI recognizes GEF objects as FigureCanvas | The GEF objects that are implemented using standard and non-standard GEF editors are recognized as FigureCanvas. |
|
Problems while recording and playing back on Internet Explorer 7.0 with HCL OneTest™ UI, version 8.0. However, recording and playing back scripts works on HCL OneTest™ UI 7.x. | This problem might occur because of the changes in HCL OneTest™ UI to improve the playback performance on Internet Explorer 7.0. |
Set the performance changes flag to false and test if the problem is resolved. To
change the performance flag:
|
Unable to view Dojo logs in Firefox. | In FireFox, few security flags have to be set to view the Dojo logs. These security flags enable Firefox to gain access to the Java scripts in the file system for the installed Dojo. | To view Dojo logs in Firefox:
|
Unable to launch the Flex application using | option through application configuration wizard.The application configuration wizard generates a html page and swf file corresponding to the Flex application mxml file. The html page generated through the wizard contains the complete path to the swf. But in case of web application the application is launched using the localhost option in the url. The swf is not accessible through complete path and hence fails to launch the application. | Modify the html page to point only to the swf name rather than
complete path.
|
Prerequisite for all users with Red Hat Enterprise Linux® 5, Update 4 and later. | To install HCL OneTest™ UI using Installation Manager, you must disable SELinux. You can disable SELinux either temporarily or permanently depending on your usage. | To disable SELinux temporarily, you must:
To disable SELinux permanently, you must:
|
HCL OneTest™ UI fails to capture visual information of controls that are displayed in the same window that had previously hosted other controls. | If the top level window is the same, then HCL OneTest™ UI captures only the hierarchy information of the actual control. |
Add the statement |
HCL OneTest™ UI The Welcome page is not displayed correctly or crashes when you click any of the Welcome page links in Ubuntu 10.04 server. |
|
|
Unable to record functional test scripts for testing SAP GUI. | This might occur if the SAP GUI client or the SAP server is not enabled for functional testing. |
Note: If the SAP server is restarted, ensure that you enable the SAP server for
testing again.
|
HCL OneTest™ UI throws the StringNotInCodePage exception during playback of non-English characters. | This might occur if the script contains characters that are not supported by the active or currently set Input Method Editor (IME). HCL OneTest™ UI uses the currently set IME to input characters into the AUT. | Set the application to an IME that supports the characters being input by the script (inputChar or inputKeys APIs). The IME that you set must be installed on the workstation. |
Functional test scripts recorded in Microsoft Internet Explorer 9.0 pass with weak recognition when run in Internet Explorer 8.0, and vice versa. This inconsistently causes playback to sometimes be slow and sometimes fail. | This occurs because of changes in object recognition properties of the empty document object from Internet Explorer 8.0 to Internet Explorer 9.0. | Update the recognition properties of a recorded empty document object to make it compatible with Internet Explorer 9.0. |
The HCL OneTest™ UI Mozilla Firefox enabler extension is disabled. | This sometimes occurs when Firefox security patches are installed. | Disable the Firefox browser using the HCL OneTest™ UI enabler wizard, and then enable the Firefox browser again. |
Recording and playback on a 64-bit Internet Explorer 9.0 browser is slow and causes the application under test to respond slowly as well. | This sometimes occurs due to information that is persisted on a 64-bit Internet Explorer 9.0 browser, which times out and causes delay. | In the ivory.properties file, set the flag rational.test.ft.browser.infest_on_demand to false, and then try to record and play back. |
After installing HCL OneTest™ UI .NET 2010 Scripting, the option to create a new functional test project is not available in the menu or in the New Project wizard. | This can occur if the the Rftvs10.dll file is not successfully registered. |
|
In Mircosoft Windows environments, functional test scripts created using HCL OneTest™ UI, Microsoft Visual Studio .NET Integration fail to play back. | This occurs if some HCL OneTest™ UI components are not available when opening Microsoft Visual Studio, after HCL OneTest™ UI, Microsoft Visual Studio .NET Integration is installed on Microsoft Windows operating systems. | Copy the msvcp71.dll file into the System32 directory (C:\Windows\System32) or the SysWOW64 directory (C:\Windows\SysWOW64), if it is not already available. You can copy the msvcp71.dll file from any other supported Windows operating system or download it from the Internet. |
In some combinations of JREs and operating systems, the browser shuts down unexpectedly when text is entered in a text box in an applet embedded in a HTML page. | This occurs if automatic enablement of the functional test environment does not take place properly. | Do one of the following, as required:
|