cancel
Showing results for 
Search instead for 
Did you mean: 

SAP TAO Customizing the Runtime Library

Former Member
0 Kudos

All,

I am trying to build SAP TAO Customizing the Runtime Library for and following the instructions:

1. Edit “CBASE_Custom_Wrappers.vbs

2. added code as follows:

     Sub CUSTOM_CaptureScreen( windowTitle )

     Dim activeWindow

           Set activeWindow = TAO.GetSapGuiSession().ActiveWindow

                    If activeWindow.Text = windowTitle Then

                             TAO.CaptureScreen()

                    End If

      End Sub

3. Verifying the Syntax of Custom Code by executing CBASE_Bootstarp.vbs was able to see CBASE_Custom_Wrapper.vbs

4. Call the Execute statement :

PARAMETERS

     Library: CBASE_Custom_Wrappers.vbs

     Statement "CUSTOM_CaptureScreen “Screen Name”

But I am getting error as * ERROR DETECTED * Error: 1032 Description: Invalid character Source: Microsoft VBScript compilation error * LAST CONTROL URI * label -> titl type -> GuiTitlebar id -> /app/con[0]/ses[0]/wnd[0]/titl

I was expecting the custom wrapper to work according to SAP TAO 3.0 SP2 and above Runtime Library and default component...page 184

Any help would be welcome

Thanks!

PS: Check the screen shots

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

My feeling here is that the quote characters (i.e.: "" ) have to be escaped.

Please try to escape it using the QUOTE token, like shown below:

CUSTOM_CaptureScreen %quote%Screen Name%quote%

Or the regular VBS escaping syntax:

CUSTOM_CaptureScreen "“Screen Name"”

The root cause of the problem here is that the value of the input parameter is put "inline" in the generated VBS coding.

That is to say that you currently try to execute the following code:

statement =  "CUSTOM_CaptureScreen “Screen Name”"

EXECUTE statement

This of course cannot be interpreted.

Regards
Claude

Former Member
0 Kudos

Hello

CUSTOM_CaptureScreen %quote%Screen Name%quote% worked in SAP ECC. But when I try the same with CRM Portal it fails.


Fig 1: Screen to be captured




Fig 2: Object Spy: [TAF] Identifcation




Fig 3: ALM Component setting for Execute Statement



Fig 4: ALM Error 424.


I have tried both "" and %quotes%

Seems that object is not recognizable or this wrapper sub works only for ECC and not CRM

'##############################################################################

' CBASE_Custom_Wrappers is the library where to put custom functions          

'                                                                           

' This library is delivered empty within SAP TAO                            

' - Custom functions written here should not override existing TAO Functions

' - Please make sure to use a prefix to avoid name conflicts especially when

' declaring global variables                                               

'

'##############################################################################

'# AssemblyTitle("SAP TAO Application")

'# AssemblyDescription("SAP Test Acceleration and Optimization")

'# AssemblyCompany("SAP")

'# AssemblyProduct("SAP_TAO")

'# AssemblyCopyright("Copyright (c) 2008-2013 SAP AG. All rights reserved.")

'# AssemblyTrademark("Trademark 2008-2013 SAP AG")

'# AssemblyVersion("3.0.4.3")

'# AssemblyFileVersion("3.0.4.3")

'# AssemblyInformationalVersion("3.0.4.3")

'##############################################################################

'---------------------

' Begin - Custom Code

'---------------------

' Put your custom code here - No custom code is delivered by SAP

Sub CUSTOM_CaptureScreen (windowTitle)

    Dim activeWindow

    Set activeWindow = TAO.GetSapGuiSession().ActiveWindow

  If activeWindow.Text = windowTitle Then

  TAO.CaptureScreen()

        End If

End Sub

'---------------------

' End - Custom Code

'---------------------

If Not IsEmpty(Environment) Or CBASE_BOOTSTRAP Then

  'This line prevents from loading the library twice.

  ExecutionContext().DeclareLibrary "CBASE_Custom_Wrappers.vbs"

End If 

Thanks for your help in advance

Regards

Saurabh

0 Kudos


Hello,

You are now facing a different issue. Your custom code only works when testing SAPGUI transactions.


If you want to capture a screenshot of the HTML content displayed in Internet Explorer you must write

another custom function. The API to get access to the browser and the embedded HTML document is completely different. This is the reason why SAP TAO delivers 3 Default Components to capture screenshots.

  • SAP GUI ==> \Components\SAP Front End\Actions\CaptureScreen
  • CRM Web UI ==> \Components\SAP CRM\Actions\CaptureScreen
  • Web ==> \Components\Web\Actions\CaptureScreen

Regards,
Claude

Former Member
0 Kudos

Hello Claude,

Thanks for the insight, that was helpful and I did that after I send this communication. My problem is with the dropdownlistbox

I am unable to get the data using dropdownlistbox.

Thanks for your continued help

Saurabh

Answers (0)