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