on 04-27-2015 9:54 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Regards,
Claude
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.