How to create or modify SAP Solution Manager structured parameters

Starting on Unified Functional Testing (UFT) 11.52, it is possible to pass complex values from SAP Solution Manager to UFT tests.

When working in integrated mode with SAP Solution Manager, structure-type test parameters can be used to pass complex values such as XML values or arrays from a Solution Manager test script to a GUI test, or vice versa.

The structured parameters are created and maintained in SAP Solution Manager. After test parameters are defined via SAP Solution Manager the action parameters can be mapped to the structured parameters in the test. When a test runs, UFT receives the defined structure from SAP Solution Manager, and resolves the mapped local parameter with the actual structured parameter value from SAP Solution Manager.

To create or modify the structured parameters of a test:

1. From SAP Solution Manager, launch the test as an external test (UFT will open with the test displayed)

2. In the Parameters tab of the Properties pane, click the Maintain SAP Parameters icon . If the Properties Pane is not already open, select View > Properties to open it (SAP Solutions Manager opens and UFT is hidden)

Note: SAP Structured Parameters can be maintained only in SAP Solution Manager.

3. In SAP Solutions Manager, create or modify the desired structure parameters, save your changes and click Back (UFT re-opens with the changes now available)

How To Click on a Specific Cell of a WebTable Object

To click on a specific cell in a web table, refer to the sample "ClickOnCell" method below. This method is provided AS-IS.

The code below will add the method "ClickOnCell" to the WebTable object. It accepts two arguments, row and column. Both row and column start on the index value of 1.

‘ row and columns start at index 1

Public function myClickOnCell (obj, row, col)

Set oDesc = Description.Create()

oDesc("micclass").Value = "WebElement"

set objs = obj.ChildObjects(oDesc)

count = objs.count – 1

r = 0

c = 0

For i = 0 To count

tag = objs(i).GetROProperty("html tag")

If tag = "TR" Then

r = r +1

c = 0

Else If tag = "TD" or tag = "TH" Then

c = c + 1

End If

‘print tag & " " & " r:" & r & " c:" & c ‘ you can use this line for debugging and understanding purposes

If r = row and c = col Then

oldReplayType = Setting.webpackage("ReplayType")

Setting.webpackage("ReplayType") = 2

Set ibs = objs(i).ChildObjects(Description.Create)

If ibs.count = 0 Then ‘ check for a child object inside the cell

objs(i).click

Else

ibs(0).click

End If

Setting.webpackage("ReplayType") = oldReplayType

Exit Function

End If

Next

End Function

RegisterUserFunc "WebTable", "ClickOnCell", "myClickOnCell", False

‘ Example Usage

Browser("My Browser").Page("My Page").WebTable("My Table").ClickOnCell 3, 2

QTP/UFT does not recognize Popup Dialogs in Chrome Browser

The Popup Dialogs from Web application are identified as WinObject in Chrome.

Currently, in order to click in the dialog popup in Chrome User needs to use the below workarounds:

1. SendKeys – To press the OK button always selected by default in the Pop-up

wait 2

Set obj = CreateObject("WScript.Shell") ‘ Creates object we can use to call SendKeys

obj.SendKeys "{ENTER}"

Set obj = Nothing ‘ destroys object (no longer needed once typing is done)

2. Recording on the dialog with no add-ins

a. Load QTP with no add-ins

b. record the click operation

c. Load QTP with web add-in

d. Set the relative coordinates for the buttons in the dialog box to press:

Window("Browser").Window("mywindow").click 290,83

Note: Ensure that both windows has the require object properties to be identify in chrome (change between chrome and IE).

3. Low Level Recording.

4. Insight Feature (Image based testing) – Only for UFT 11.50

BSAE installer times out during installation

BSAE (Business Service Automation Essentials) 2.0 fails to install. During installation on disk 2, the verbose log shows that the installer times out while waiting for the Business Objects server to start up. You will see it waits for a period of seconds, times out, then increases the period of seconds by 10 and tries again. This happens until it times out after waiting 180 seconds.

Business Objects uses a third party library for encryption. There is a known bug in the AMD Opteron chipset that causes this library to give a segmentation fault during installation.

Another common cause of this problem is installing Business Objects on a virtual machine with more than 1 configured Central Processing Unit (CPU).

To fix the segmentation fault, SAP provided us with a patch that we apply during installation. We only apply the patch to systems that have AMD Opteron processors (according to /proc/cpuinfo).

We have found that some AMD Opteron systems don’t need the patch. The patch will actually cause the timeout issue described in the problem statement above. To fix this issue the user will need to uninstall the files from the failed install, then place the attached bsae-bo-post.sh script in their /var/tmp directory. Then start the install again. You should not need to uninstall disk 1.

The script is basically the same as the original. The only difference is that we update the path to AMD patch so that it points to a non-existent location. The script will simply skip the patch install if it doesn’t find the patch.

The above downloadable zip file’s md5sum is as follows:

$ md5sum bsae-bo-post.sh.zip

3399a13f6f30dec6bb268c5798ab4ed7 bsae-bo-post.sh.zip

You will need to unzip the file after copying over to the BSAE server. (It is recommended that you do not unzip until after copying to the BSAE server. Depending on the file transfer protocol and client used, ^M characters may be inserted through the unzipped text file (shell script).)

Be certain to set the execute bit on the script:

$ chmod +x bsae-bo-post.sh

If you are unable to download the script from the link above, copy/paste the following into a file named bsae-bo-post.sh and save it to the target BSAE server. Please be careful, as there are certain Windows editors which will embed the ^M character when you paste. These characters should be removed in order to ensure proper functionality.

—- begin copy below this line —-

#!/bin/bash

#########################################################################

#

# Post install configuration

#

#########################################################################

export BO_DIR=/opt/opsware/omdb/bo

export BOBJE_DIR=${BO_DIR}/bobje

export BO_INSTALLER_DIR=/opt/opsware/omdb/bo_installer

export COMP_DIR=/opt/opsware/omdb/components

cd ${BO_INSTALLER_DIR}

setup () {

OMDB_PROPS=/etc/opt/opsware/omdb/omdb.properties

#Read values from omdb.properties and set in environment variables.

# For example, com.opsware.cmdb.interview.omcs_twistUser=admin gets set in the

# environment as omcs_twistUser=admin.

for i in `grep ‘^com.opsware.cmdb.interview.’ ${OMDB_PROPS} | sed ‘s/com.opsware.cmdb.interview.//g;s/\(^om..\)\./\1_/g’ | sed ‘s/^omcs\./omcs_/g’ | sed ‘s/^omdb\./omdb_/g’`; do

if [ “`uname`” = “SunOS” ]; then

set `echo $i | tr ‘=’ ‘ ‘`

set $1=$2; export $1

else

export $i

fi

done

}

fixup_oracle () {

#These lines fixup the listener correctly in the database – needed for BO to work.

# Ideally the database install should already have done this.

chown oracle:oinstall /u01/app/oracle/product/10.2.0/db_1/network/admin/*.ora

#update local components copy of listener.ora

perl -pi -e “s/HOST=.*\)/HOST=$omdb_oracleHost\)/g” ${COMP_DIR}/listener.ora

perl -pi -e “s/SID_NAME=.*\)/SID_NAME=$omdb_oracleSid\)/g” ${COMP_DIR}/listener.ora

perl -pi -e “s/PORT=.*\)/PORT=$omdb_oraclePort\)/g” ${COMP_DIR}/listener.ora

#update local components copy of tnsnames.ora

perl -pi -e “s/SERVICE_NAME=.*\)/SERVICE_NAME=cmdb.opsware.com\)/g” ${COMP_DIR}/tnsnames.ora

perl -pi -e “s/HOST=.*\)/HOST=$omdb_oracleHost\)/g” ${COMP_DIR}/tnsnames.ora

perl -pi -e “s/PORT=.*\)/PORT=$omdb_oraclePort\)/g” ${COMP_DIR}/tnsnames.ora

perl -pi -e “s/.*=\(DESCRIPTION/$omdb_oracleSid=\(DESCRIPTION/g” ${COMP_DIR}/tnsnames.ora

#move that components copy into place

mv -f /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora.bak

mv -f /var/opt/oracle/tnsnames.ora /var/opt/oracle/tnsnames.ora.bak

cp -f ${COMP_DIR}/tnsnames.ora /var/opt/oracle/tnsnames.ora

ln -s /var/opt/oracle/tnsnames.ora /u01/app/oracle/product/10.2.0/db_1/network/admin

cp ${COMP_DIR}/listener.ora /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

chown oracle:oinstall /u01/app/oracle/product/10.2.0/db_1/network/admin/*.ora

chown oracle:oinstall /var/opt/oracle/tnsnames.ora

#reload the listener config

su – oracle -c ‘lsnrctl reload’

}

is_bo_installed() {

if [ -f ${BO_DIR}/setup/utils/cmslogon/cmslogon.jar ]; then

echo “BO is already installed.”

return 1

else

echo “BO is not yet installed.”

return 0

fi

}

extract_bo () {

BO_TARGZ=”bo.tar.gz”

AMD_PATCH=”wra00000.tar.gz”

AMD_PATCH_PATH=/dummy/path/$AMD_PATCH

# If present, use response file in /var/tmp rather than the one in the rpm

if [ -f /var/tmp/${BO_TARGZ} ]; then

echo ‘NOTE — Using “/var/tmp/${BO_TARGZ}”

How to enable the Web Services Add-in in UFT 11.5x

The Web Services Add-in is supported for backward compatibility only and it is not enabled by default in Unified Functional Testing (UFT) 11.5x. New tests and components can use UFT API testing features for Web Services testing.

Here are the steps to enable the Web Services Add-in in UFT 11.5x.

1. Make sure UFT 11.5x is closed.

2. Open the Registry Editor by going to Start -> Run and type “regedit”. Then hit Enter.

3. Navigate to:

If machine is 32bit (x86)

HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\Add-in Manager\WebServices

If machine is 64bit (x64)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercury Interactive\QuickTest Professional\Add-in Manager\WebServices

4. Change the value of the binary entry called “Not Available” from 1 to 0.

5. When launching UFT11.5x again the Web Services add-in is available in the Add-in Manager.

How to force a BSAE User Import

To force a user import from the configured authentication sources through the Business Service Automation Essentials (BSAE) jmx-console you should follow the following procedure.

1. Open a browser to the jmx-console web site.(i.e. https://{hostname/IP}:8443/jmx-console)

2. Login as the BSAE admin user

3. Scroll down to the "omdb.security" section near the bottom of the page.

4. Click on service=SourceUserMapper

5. Scroll down to the table entry for "UserImportEnabled" and click on the "TRUE" radio button.

6. Also click on the "TRUE" radio button for the "UserMappingEnabled"

7. Click on the "Apply Changes" button to save these settings. (Note: There will be no change in the line other than the radio button being blanked out.)

8. At this point you may want to tail the /var/log/opsware/omdb/server.log to watch the user import process for errors or confirmation.

9. Scroll down to the "void startImportUsersThread()" section and click the "Invoke" button.

10. This should begin the user import process for the configured authentication sources.