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.

Table 1.
Problem Description Solution

On Linux, when you either run the recorded scripts or insert objects to the scripts for the Eclipse application in Rational® Functional Tester, the scripts fail and display the ObjectNotFound Exception error.

There is a mismatch in the GTK version between Rational® Functional Tester 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:
  1. Copy the com.rational.test.ft.enabler.wsw plugin from the following path in the Rational® Functional Tester installation directory:

    <RFT installation directory>\FunctionalTester\EclipseEnabler\plugin

  2. Paste the copied plugin into the dropins folder in the following location:

    <Eclipse installation directory>\eclipse\dropins

    Note:

    If the dropins folder does not exist, you must create a folder and name the folder as dropins.

  3. Modify the platform.xml of the Eclipse application in the following location <Eclipse installation directory>\eclipse\configuration\org.eclipse.update by performing these steps:
    1. Open the platform.xml file.
    2. Enter the path of the plugin in the platform.xml file. For example, <site enabled="true" list=".... ,dropins/com.rational.test.ft.enabler.wsw_10.1.0.v20210707_0312/">...</site>
    3. Save the platform.xml file.
  4. Change the GTK version from 3.x to 2.x by performing the following steps:
    1. Open the <filename>.ini file that is in the Eclipsefolder of following path <Installation path of the Eclipse application>\eclipse\.
    2. Add the following lines before the -vmargs entry:
      • --launcher.GTK_version
      • 2
    3. Save the <filename>.ini file.

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 Rational® Functional Tester 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 Rational® Functional Tester.

You must perform the following tasks:
  1. Log off and log in again to your computer.
  2. Play back the compound test.

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:
  1. Go to Windows > Preferences > Playback.
  2. Select Play back with Web UI Extension and Play back with Web UI Action options.

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:
  1. Download the latest drivers for Chrome or Edge drivers.
  2. Save the downloaded driver in the Configuration folder in the following path C:\ProgramData\IBM\RFT\.
  3. Play back functional tests through the Web UI method.

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:
  • Delete the calendar close method that was generated in the script.
  • Close the calendar control before exiting the "Insert Data Driven Actions" wizard.

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:
  • Press the Enter or F2 key after you type/select the value in the text/combo box or expand a node of the tree control and then invoke the data verification point wizard.
  • Cut and paste these methods before performing data verification on the text/combo box/tree control in the script.

Rational® Functional Tester does not recognize Siebel 7.7 controls after moving back to Siebel 7.7 from Siebel 7.8.

When you start Siebel 7.8, Internet Explorer installs the latest Siebel ActiveX objects. So, if you try to record using Rational® Functional Tester on Siebel 7.7 after this, Rational® Functional Tester is not able to recognize Siebel 7.7 controls.

Remove the Siebel ActiveX objects from the folder C:\WINDOWS\Downloaded Program Files and then try to work with the Siebel 7.7 application again.

A Java application-under-test (AUT) does not open while configuring the application for testing in Rational® Functional Tester.

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.

  • Use the same or higher version of JRE that is supported by Rational® Functional Tester to test the application.
  • Recompile the test application by setting the source and target levels of JRE in your Java IDE.

    An example to compile the test application by setting the source and target flags using the command line interface:

    C:\AUT\Test>"C:\Program Files\Java\jdk1.5.0_06\bin\javac.exe" -source 1.4 -target 1.4 *.java

Playback fails while testing SAP applications that contains password fields.

Rational® Functional Tester 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.

Rational® Functional Tester 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 Rational® Functional Tester 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 statementrational.test.ft.enable_eclipse_support=false in ivory.properties file.

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.

  • If the DOM hierarchy of the browsers is not same then the failure is not happening because of a Rational® Functional Tester problem. The browsers are creating different DOM hierarchy because of which the playback fails.

    Workaround: This can be fixed by introducing the missing hierarchy Rational® Functional Tester looks for while playing back the script

  • If DOM hierarchy of browsers is same then there might be a problem with Rational® Functional Tester.

Record and playback does not work on browser menu options

Rational® Functional Tester 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:

Browser_HtmlBrowser(Document_HtmlDocument(),DEFAULT_FLAGS).InputKeys("%fc")

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: dialog_calendar().close();

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, Rational® Functional Tester may not recognise or read the files that are being imported. In Rational® Functional Tester 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:
  1. Select the imported project or the project to which you are importing the files in the Functional Test Projects pane.
  2. Click Project > Properties.
  3. In the Properties window, select Info from the list.
  4. In the Text file encoding field, click Other.
  5. Select ISO-8859-1 from the drop-down list.
  6. Click OK.

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:
  • Configure the security level for the Local Intranet zone to Full Trust. You can do this following these steps:
    1. Go to Control Panel > Administrative Tools and open Microsoft® .NET Framework Configuration.
    2. Select Configure Code Access Security Policy and click Adjust Zone Security.
    3. Select Local Intranet in the Security Adjustment Wizard and set the trust level to Full Trust.
If you still continue to see the message, perform the following steps:
  • Specify the computer name instead of the IP address as the project path.
  • Configure the following in Internet Explorer:
    1. Click Tools > Internet Options in the Internet Explorer window.
    2. In the Security tab, select Local intranet zone.
    3. Click Sites.
    4. In the Local Intranet dialog box, click Advanced.
    5. Clear Require server verification (https:) for all sites in this zone.
    6. Specify the project path and click Add.
    7. Click OK.

Unable to resolve resource bundle

If Flex Builder 2 is used to build a Flex application with the Rational® Functional Tester 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:
  1. Click Configure > Enable Environments for Testing > Java environments tab.
  2. Type -Dawt.toolkit=sun.awt.motif.MToolkit in the Run Options field and click Finish.
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.
Rational® Functional Tester does not record the actions with the Flex applications. This occurs if the Flex environment and the application are not configured correctly. Ensure that:
  • The Internet Explorer setting Initialize and script ActiveX controls not marked as safe is enabled.
  • The application is loaded through a HTML page, with an <object> tag that has an id attribute set, and the id attribute contains no periods or hyphens.
  • The application is loaded either from a web server or locally from a trusted SWF file.
ObjectNotFound exception occurs during script playback and the exception message indicates that the object state is incorrect.

For example: Looking for [button] with state [ENABLED|VISIBLE|READY], possible failing candidate[{.mappableClassIndex=0, text=*!ENT!*, .classIndex=0}] with incorrect state [DISABLED]

During playback, Rational® Functional Tester expects one of the following state for a test object:
  • ENABLED
  • VISIBLE
  • READY (for browser)
If the state of the test object does not match the expected state, the ObjectNotFound exception occurs.
To override the exception, set the anchor of the object to null or ANY.

For example: Replace button().click(); with button(null, DISABLED).click();

Rational® Functional Tester recognizes GEF objects as FigureCanvas The GEF objects that are implemented using standard and non-standard GEF editors are recognized as FigureCanvas.
  • Ensure that the GEF enabler plug-in com.rational.test.ft.gef_xx.jar exists in the plug-in directory of the AUT.
  • If the GEF objects are not identified even after enabling, start the AUT with -clean option.
  • For non-standard editors, add the method getAdapter in the non-standard GEF editor (AUT). This method is used by Rational® Functional Tester to get an instance of GraphicalViewer to recognize GEF objects in the editor.
    public Object getAdapter(Class type)
    {
    if (type == org.eclipse.gef.GraphicalViewer.class)
     {
    <<return the current instance of org.eclipse.gef.GraphicalViewer>>
     }
    }
    
Problems while recording and playing back on Internet Explorer 7.0 with Rational® Functional Tester, version 8.0. However, recording and playing back scripts works on Rational® Functional Tester 7.x. This problem might occur because of the changes in Rational® Functional Tester 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:
  1. Open the ivory.properties file located at <Product installation directory>\IBM\SDP\FunctionalTester\bin
  2. Set rational.test.ft.html.enableie7performancechanges=false
    Note: Changing this flag to false will impact the performance while testing HTML applications on Internet Explorer 7.0.
  3. Restart Internet Explorer 7.0 for the changes to take place.
Firefox 3.0 browser is not enabled by default even when the Enabler displays Firefox 3.0 as enabled after upgrading from Firefox 2.0 to Firefox 3.0. Firefox 3.0 is installed in the same location as Firefox 2.0. So, a different enablement dll is required. To enable Firefox 3.0 browser, disable and enable the browser after upgrading from Firefox 2.0 to Firefox 3.0.
Unable to view Dojo logs in Firefox version 3.0. In FireFox version 3.0, few security flags have to be set to view the Dojo logs. These security flags enable Firefox version 3.0 to gain access to the Java scripts in the file system for the installed Dojo. To view Dojo logs in Firefox 3.0:
  1. Type about:config as the URL in the Firefox 3.0 browser.
  2. Set the following security flags:
    • key: security.fileuri.origin_policy and value: 3
    • key: security.fileuri.strict_origin_policy and value: false
Unable to launch the Flex application using Web application > Compile time 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.
  • Change <param name="movie" value="C:\FlexSample\Smoke.swf"> to <param name="movie" value="Smoke.swf"/>.
  • Change <embed src="C:\FlexSample\Smoke.swf"> to <embed src="Smoke.swf">.
Prerequisite for all users with Red Hat Enterprise Linux® 5, Update 4 and later. To install Rational® Functional Tester 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:
  1. Open the terminal with root credentials
  2. Browse to /usr/sbin and run the command run the command setenforce 0.
To disable SELinux permanently, you must:
  1. Open the terminal with root credentials
  2. Browse to /etc/selinux
  3. Open config in editable mode
  4. Change the value from enforcing to disabled.
  5. Restart the computer.
Rational® Functional Tester 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 Rational® Functional Tester captures only the hierarchy information of the actual control.

Add the statement rational.test.ft.enable_eclipse_support=false in ivory.properties file.

Rational® Functional Tester The Welcome page is not displayed correctly or crashes when you click any of the Welcome page links in Ubuntu 10.04 server.
  • Ensure that the version of the xulrunner is -1.9.2.
  • Before launching Rational® Functional Tester, add the line: -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner to the eclipse.ini file available in the Rational® Functional Tester installation directory. For example: /opt/IBM/SDP/eclipse.ini
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.
  1. Verify that Rational® Functional Tester supports the SAP GUI version for testing.
  2. Enable the SAP GUI client for testing.
  3. Enable the SAP server for testing
Note: If the SAP server is restarted, ensure that you enable the SAP server for testing again.
Rational® Functional Tester 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). Rational® Functional Tester 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 Rational® Functional Tester Mozilla Firefox enabler extension is disabled. This sometimes occurs when Firefox security patches are installed. Disable the Firefox browser using the Rational® Functional Tester 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 Rational® Functional Tester .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.
  1. Download and install the vcredist_x86.EXE file from the location http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=26347. Complete the installation instructions mentioned in the page. You might be prompted to restart your computer.
  2. Open the command prompt and navigate to C:\Program Files\IBM\FunctionalTester\vsnet\bin (on 64-bit computers, C:\Program Files (x86)\IBM\FunctionalTester\vsnet\bin)
  3. Run the following command: regsvr32 RftVs10.dll. A dialog box is displayed, with a message indicating that the Rftvs10.dll file was successfully registered: DllRegisterServer in RftVs10.dll succeeded.
In Mircosoft Windows environments, functional test scripts created using Rational® Functional Tester, Microsoft Visual Studio .NET Integration fail to play back. This occurs if some Rational® Functional Tester components are not available when opening Microsoft Visual Studio, after Rational® Functional Tester, 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:
  • For Internet Explorer browsers, update the policy file with the permissions in the security folder of the JRE that is associated with the browser.
  • For Mozilla Firefox browsers, manually enable the browsers, and ensure that the Next-Gen plug-in is disabled.
  • Use the Scripting option to access elements relative to the enabled domain toplevelwindow (either HTMLTopLevelWindow or JavaTopLevelWindow)