Friday, September 23, 2011

How to record with object names

When recording an Oracle NCA script, it is required to record using object names instead of object ID. You can use either of the following methods to record using object names. The simplest way is 2, however this will not always work. 

i.    Set the record=names flag for specific user profile
a.    Logon to Oracle Application using admin logon
b.    Click on the link for ‘system administrator’


c.    On the ‘Navigator-administrator’ pop-up window, select ‘Profile System Value’

d.    On the ‘Find System Profile Values’ window,
1.    Check the ‘Site’ Checkbox
2.    Check the ‘User’ Checkbox and specify the desired user logon
3.    Uncheck ‘Profiles with No Values’ and specify %ICX%Launch% on the textbox for ‘Profile’\
4.    Click on ‘find’


e.    On the ‘System Profile Values’ window
•    Look for the  ‘ICX: Forms Launcher’ Profile
•    Update the user value to include “?play=&record=names”
EXAMPLE:
Change from http://oracleapps:1111/dev60cgi/f60cgi
To http://oracleapps:1111/dev60cgi/f60cgi?play=&record=names



f.    Save the changes and exit the application.
g.    Sign on again via Personal Home page using the username and this setup will be enabled.



ii.    Set the record=names flag through the recording URL
This is the easiest method to record with object names. However, this method is not always possible. To implement this solution, simply add "?record=names" after the recording URL.  This will allow VuGen to record using object names for that session.

EXAMPLE:
Original URL:                      http://OracleApps.com:9002
Enter to the ‘Start Recording’ Window: http://OracleApps.com:9002?record=names

NOTE: If you are already passing a parameter in the original URL, then you need to append “&record=names” instead.
EXAMPLE:
Original URL                      http:// OracleApps.com:9002?config=abc
Enter to the ‘Start Recording’ Window: http:// OracleApps.com:9002?config=abc&record=names



iii.    Set the record=names flag through Web CGI configuration file and startup HTML file

a.    Steps to verify which server files need to be modified:
•    Record a Winsock script against the Oracle Forms application.
•    After logging into the application, stop the recording.
•    Go to the data.ws file.
•    Search for ".cfg" without the quotes (") from the beginning of the data.ws file.
•    You should come to a section that looks like the following:

"<HTML>\n"
"<!-- $Header: appsbase.htm 115.18 2003/02/17 04:15:03 smaradan ship $ -->\n"
"<!--          appsweb.cfg  115.121 -->\n"
"<HEAD>\n"
"<TITLE>Oracle Applications 11i </TITLE>\n"
"</HEAD>\n"

•    You need to make the changes to the files mentioned as shown above.  In most cases it's appsbase.htm and appsweb.cfg.  In other cases, it may be basejini.htm and formsweb.cfg.  The Winsock recording will contain this information.


b.    Modify the Forms Web CGI configuration file 
•    Bring up the Forms Web CGI configuration file. This is the cfg file identified from step (a)
•    Add xrecord=names to anywhere in the file. Mercury recommends you to append it to the end of ‘Values for the Forms applet parameters’ section.
•    EXAMPLE: Refer to Appendix 1 for sample FORMSWEB.CFG file.



c.    Modify the startup HTML file
•    Bring up the startup HTML file. This is commonly known as basejini.htm
•    Look for the line with <PARAM NAME="serverArgs"
•    Append record=%xrecord% to the end of it.
EXAMPLE:
<PARAM NAME="serverArgs" VALUE="module=%form% userid=%userid% %otherParams% record=%xrecord%">

•    NOTE: There are multiple occurrences of “serverArgs” – make sure you append the flag at the end of each occurrence.
•    EXAMPLE: Refer to Appendix 2 for sample basejini.htm file




How to check to see if user is recording with object names

If you have successfully recorded a script using object names, then in the connect_server statement of the Oracle NCA script you will see the flag at the end of the statement.

EXAMPLE:
connect_server("199.35.107.119","9002"/*version=11i*/,"module=/d1/oracle/visappl/fnd/11.5.0/forms/US/FNDSCSGN userid=APPLSYSPUB/PUB@VIS fndnam=apps record=names ");




How to recording an Oracle NCA script

1.    Recording using JDK as the client
a.    In the Start Recording window, simply enter the URL of the application.
b.    Click on the options button.
c.    Select “Specify path to the browser” if not already selected.
d.    Click on Browse.
e.    Browse to the appletviewer.exe file.
f.    Click on Open and then OK.
g.    Click on OK in the Start Recording window.

2.    Recording using the browser as the client
Simply enter the URL into the Start Recording window and click on OK.







How to handle windows with dynamic names
There are few occasions where you will need to handle dynamic windows name.

EXAMPLE:
You have recorded a transaction against a window that displays a dynamic number after the window name.
set_window( "Responsibilities - 12345");
lov_retrieve_items("Responsibilities - 12345",1,4);
lov_select_item("Responsibilities - 12345","Apps for the Web Manager");

During replay the script will fail at lov_retrieve_items (not at set_window because set_window is a COMMENT – it does not get executed and is only there for readability purposes) because the server gives a different number. To resolve this, simply delete the dynamic number from the window name.

set_window( "Responsibilities - ");
lov_retrieve_items("Responsibilities - ",1,4);
lov_select_item("Responsibilities - ","Apps for the Web Manager");







No comments:

Post a Comment