When recording scripts on your HTML applications, use Functional Tester to start the application during recording. Functional Tester opens the HTML page that you specify in your default browser or in a specific browser.
When recording scripts on your HTML applications, you can record a hover on drop-down menus that are activated when you roll the mouse over the drop-down menu. These drop-down menus are implemented with DIV tags. To record a hover for drop-down menus, and make the sub-menu drop down, hover the mouse over the menu item text and press Shift. Make sure the mouse is on the text of the menu item and not on the blank space to the right of the menu item text.
Two versions of the deleteCookies method are available. One method deletes all cookies for the current profile or user and the other method deletes cookies in a specific path or domain for the current profile or user. For information, see the Functional Tester API Reference, in the com.rational.test.ft.object.interfaces package, under IBrowserObject.
Because selections on browser menus are recorded based on their screen coordinates, scripts may not play back reliably if the browser size or position change. Also, menus are different on different browsers, which may also cause scripts to play back incorrectly.
If you resize the browser to a smaller size, Functional Tester does not scroll the applet objects into view during playback if they are not in view.
The location of the Address field in a browser is based on screen coordinates, which can change if the browser's size and position change. A script usually fails if you click in the Address field and type the new URL. When recording, insert a browser click (Browser_htmlBrowser) in your script to change URLs.
If you use .size Property for INPUT elements and do not specify the .size property within the Html of an INPUT element, the default value returned by the Internet Explorer is 20.
When you create a cross-platform script, avoid toolbar buttons that only appear in one browser. The following toolbar buttons are common to both browsers:
The Close button is available in the Internet Explorer. When you record a cross-platform script, avoid using alternative methods of exiting the browser. For example, pressing Alt+F+C works only for Internet Explorer. Either key combination causes a script to fail when run on the other browser.
Sometimes script playback for testing HTML application fails if the ready state of the browser object is not 4. Ensure that the ready state of the browser is 4 while playing back a script. You can do this by modifying the test script manually as shown in the examples.
Script to check the browser state in Java: logInfo("Ready State #: "+browser_htmlBrowser().getProperty(".readyState").toString());
Script to check the browser state in .Net: LogInfo("Ready State #: " & Browser_HtmlBrowser().GetProperty(".readyState").ToString)
Use a waitForExistence method when recording cross-browser scripts to wait for a browser. For example:
To handle a pop-up menu, some browsers ignore a click action on a link immediately following a right-click. When this click combination is necessary, right-click the link, click an empty space in the document, and then click the link.
In some browsers, pressing Ctrl and clicking a link opens the page in another instance of the browser. This same key sequence results in a normal link click in other browsers. A script that contains this combination of actions plays back differently and should be avoided for cross-browser testing.
Occasionally errors in HTML can cause different browsers to interpret the HTML DOM hierarchy differently. A script that runs successfully in one browser can fail in another. Record one script against each browser and compare the resulting test object maps. If the maps show a different hierarchy, run a utility, such as HTML Tidy. If the utility reports errors, it is possible that the errors are causing the different interpretations of the object model, resulting in different hierarchies. HTML Tidy is available from the World Wide Web Consortium, www.w3.org.
When recording a script in some browsers, a pop-up message (browser user interface dialog boxes), such as encryption notices occasionally appear. When recording a cross-browser script, you do not want to include these message boxes, because they may not appear in other browsers. To avoid this problem:
You can modify your script to handle these kinds of message boxes, but the code can be complicated. For more information, see Extending Rational Functional Tester functionality topics.
When you record a cross-browser compatible (a script that is compatible across all browsers that Functional Tester supports) script, try to avoid recording any pop-up message boxes. If you are not recording a cross-browser compatible script, you can record pop-up message boxes in your script.
Functional Tester supports the Login, File Download, Certificate/Security Warnings, File Picker (File Open/File Save), and Print dialog boxes on the Windows platform. These user interface dialog boxes are for a specific browser and are not cross-browser compatible. In most cases, the Login dialog box is cross-browser compatible.
When you configure an application, Functional Test adds the application name to the Application Configuration Tool. If you test a lot of different URLs, the Applications list can become long. If you do not want to add a URL to the list, you can use the startBrowser command in an empty script to test it.
startBrowser ("url");
Functional Tester supports testing Microsoft HTML Applications (MSHTA). Before you can test a MSHTA, you must configure it by running mshta.exe. To configure each HTA you want to test:
For more information, see Configuring Applications for Testing.
If TestManager is installed, use it to test HTML applications remotely on Linux computers. For information, see Local and agent computers topic.
If an error about the Java plug-in is returned, when you test HTML applications or start the Comparator from the View Results link in the HTML log, you need to verify that your browser's Java plug-in is configured properly. For instructions, see the related topic about enabling the Java plug-in of a browser.
Note: To view the Rational TestManager version that can be integrated with Rational Functional Tester, see List of supported domains for functional testing by releases of Rational Functional Tester tech. note.