Copyright © 2008, Oracle. All rights reserved.
Features of The Visual Script
Introduction to Oracle Application Testing Suite: e-Tester
Copyright © 2008, Oracle. All rights reserved.3 - 2
Script Views
Scripts are viewed in a “tree” style hierarchy
Click the “+” sign to expand a node or click the “-” to close a node
Right -click a page node and select • Expand Page to view the
entire contents of the page• Collapse page to close all
nodes
Copyright © 2008, Oracle. All rights reserved.3 - 3
Page Properties
Page Properties: allows you to view additional information about the selected visual script node.
View the properties by:
• Right-clicking a node and selecting “Properties”
• Select “Edit”/“Properties”
Copyright © 2008, Oracle. All rights reserved.3 - 4
Page Components (Nodes)
Each page is divided into two major sections or “nodes”:
• Address Node: contains recorded actions, navigations, URL, page timers, and parameters.
• Frame Node: contains the content of the page
Copyright © 2008, Oracle. All rights reserved.
The Address Node
Introduction to Oracle Application Testing Suite: e-Tester
Copyright © 2008, Oracle. All rights reserved.3 - 6
Address Node
Cookies: names and values for cookie information transferred between the browser and web server.
Parameters: user input from data submitted to the current page from a form on the previous page.
Headers: information passed to the server in the HTTP header.
Duration Master/Tested: length of time taken to download the page during script record/playback. The tested time updates each time script is played.
Delay: length of time the user spent on the previous page before navigating to the current page.
Copyright © 2008, Oracle. All rights reserved.3 - 7
Address Node Properties
Right-click the Address node and select “Address Properties” to get more information on the navigations that were recorded.
Navigations show how you got from the previous page to the current page you are looking at.
e-Tester records the DHTML path and event type for each object you interacted with. e-Tester uses the path to find the object then fires the recorded event during playback. The listing of path to objects and their events are known as actions.
Copyright © 2008, Oracle. All rights reserved.3 - 8
Address Properties
Page No. and Title
User Actions
(DHMTL)
Page Load
Times
Fully Qualified URL
User Think Time
Copyright © 2008, Oracle. All rights reserved.3 - 9
Understanding Actions
e-Tester is optimized for maximum performance. Two events that are automatically recorded are:
• OnClick
• OnChange
Additional events can be captured when necessary
• onMouseOver
• onMouseUp
• onKeyPress
• And others
Performance may be severely impacted if there are many events to execute.
Copyright © 2008, Oracle. All rights reserved.3 - 10
Understanding Actions
Anytime a user clicks an object on a webpage, an action is generated.
Actions performed on a given step eventually cause navigation to a subsequent page which is where the action information is stored.
Action Sample:
Event:click
Object: link with text “account summary”
Index: fourth link on the page
Copyright © 2008, Oracle. All rights reserved.3 - 11
Understanding Actions
• Example 2:
Event:click
Frame: named “main”
Index: 2nd element in the form “login”
Object: form element with name “login button” (within form named “login”)
Copyright © 2008, Oracle. All rights reserved.3 - 12
Pages Without Actions
The first page of a script (unless the actions are carried over from another script).
Auto-Page/Auto-Split: page or frame that was returned without any action taken by user (client-side redirection).
• Unexpected Auto-Pages/Auto-Splits may be due to the user not allowing the page to fully download before performing the next navigation or incorrect settings for Java applets.
Copyright © 2008, Oracle. All rights reserved.3 - 13
Dynamic Addresses
Dynamic URLs can contain one or more variable parameters (example, session id).
e-Tester handles dynamic URLs by performing the recorded actions rather than requesting the recorded URL’s.
http://www.foo.com/home.jsp?SessionID=18a81b0&EngineID=32a1
Copyright © 2008, Oracle. All rights reserved.
Capturing Events - Advanced
Introduction to Oracle Application Testing Suite: e-Tester
Copyright © 2008, Oracle. All rights reserved.3 - 15
Events Capturing
The Visual Script Events Capture interface allows users to specify additional custom DHTML events for e-Tester to record and playback.
Capture and fire events to record/playback that may be required for script execution.
Copyright © 2008, Oracle. All rights reserved.3 - 16
Events Capturing
Select Options/Current Script/Recording/Event Recording
Choose the Element Tag and Event Name to record, and click Add Event.
Copyright © 2008, Oracle. All rights reserved.3 - 17
Events Capturing
The events specified in the event recording options will appear in the address properties. This example shows a blur event on input elements that was added in the event recording interface.
Copyright © 2008, Oracle. All rights reserved.3 - 18
Events Capturing
Be careful when adding events and know what you are adding and why.
Unnecessary events can have serious impact on the speed and performance of script recording and playback.
Unnecessary events make the script more difficult to debug.
Copyright © 2008, Oracle. All rights reserved.3 - 19
Events Capturing
The following is an example of an unnecessary mouseOver and mouseOut event on links.
Copyright © 2008, Oracle. All rights reserved.3 - 20
Events Capturing
All the user did was mouse over some links before picking the one needed
Copyright © 2008, Oracle. All rights reserved.3 - 21
Events Capturing
e-Tester can look at every object on page and automatically record certain common events handlers if it detects that an event handler was fired on the object
• Event handlers include: onblur, onchange, onfocus, onmouseover, and more
• Useful for highly dynamic applications that make extensive use of JavaScript event handlers on objects that affect navigation
Controlled by setting SmartEventRecording=True through the Settings Manager
Copyright © 2008, Oracle. All rights reserved.
“Advanced” Actions In the Address Node
Introduction to Oracle Application Testing Suite: e-Tester
Copyright © 2008, Oracle. All rights reserved.3 - 23
Advanced Actions
Users can manually modify a script without re-recording by adding actions.
DHTML objects that were recorded can can be replaced.
DHTML objects that were not recorded can be added.
Select the Advanced tab
Copyright © 2008, Oracle. All rights reserved.3 - 24
Advanced Actions
Create a New Event by selecting the “Create New Event” icon from the advanced tab
Copyright © 2008, Oracle. All rights reserved.3 - 25
Advanced Actions
Click the object for which to add the new action on the web page.
The Object Selector places the path of the selected object in the “Selected Path” field after it is clicked.
Hit ok to capture the new object path
Copyright © 2008, Oracle. All rights reserved.3 - 26
Advanced Actions
Once the object is selected, e-Tester has a new path (object) it will perform a DHTML action on.
Select the event type to cause e-Tester to perform the DHTML Action• Example: Click, Mouse
Over, and so on.
Copyright © 2008, Oracle. All rights reserved.3 - 27
Advanced Actions
The new action has been added to the Actions portion of the Address properties.
Actions can be dragged and dropped into the correct sequential location.
Copyright © 2008, Oracle. All rights reserved.3 - 28
Advanced Actions
Actions can be cut, copied, pasted, or deleted by right clicking as shown.
Copyright © 2008, Oracle. All rights reserved.3 - 29
Advanced Actions
The entire group of actions can be played back in the page by using the “Play All Events” button on the Advanced tab.
Click to select an action of interest and play it individually with the “Play Selected Events” button from the advanced tab.
Copyright © 2008, Oracle. All rights reserved.3 - 30
Review 2
1. Explain the components of the following action:click + window(index=0).link(text="browse products" href=
http://jersey/fmstocks/browse.asp| index=10)
2 . Why does e-Tester only record onClick and onChange without adjustments? Why not add all events for all objects?
3. True/False e-Tester navigates the pages by the URL.4. How can actions be added to a page in a script?5. In the address properties of page 4 of a given script there is a list of
actions. What page were the actions actually performed on?6. Sally has a script that fails to playback because a keyPress event is
required for a text box on one page. What is the better solution?A. Use the event capture interface and add the onKeyPress event for
text boxes.B. Use the advanced action to add a single onKeyPress for the specific text boxC. Manually test the transaction