SAP environment
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SAP environment
Hey there,
im trying to use testcomplete in the SAP environment but it is not working for me.
Some fields couldn’t be detected via OCR or normal testing.
I tried the image-based testing but that’s not perfect for me because the “pictures” could change and then I have to start the recording from beginning.
So I tried to use the SAP scripting.
But there I got two new Problems.
- I’m scripting in javascript and SAP scripting is in vbscript.
I have to use javascript because some expressions only work in javascript.
- How can I run the SAP scripting from Testcomplete?
I don’t get this simple script working…
************
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT2").select
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT3").select
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT4").select
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT1").select
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT1/ssubAREA_FOR_601:SAPMKAUF:0601/subAREA1:SAPMKAUF:0315/ctxtCOAS-KOSTV").setFocus
session.findById("wnd[0]/usr/tabsTABSTRIP_600/tabpBUT1/ssubAREA_FOR_601:SAPMKAUF:0601/subAREA1:SAPMKAUF:0315/ctxtCOAS-KOSTV").caretPosition = 4
*******
Thanks for your help!
Solved! Go to Solution.
- Labels:
-
Script Extensions
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Have you tried to enable '*' option for MSAA in your project? Does it provide better recognition of the problematic controls?
> I have to use javascript because some expressions only work in javascript.
Can you provide an example? All scripting languages are more or less the same and provide similar functionality.
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alex!
@RKU_AVO have you tried what Alex is suggesting?
Sonya Mihaljova
Community and Education Specialist
