cancel
Showing results for 
Search instead for 
Did you mean: 

SAP environment

SOLVED
Highlighted
New Contributor

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.

  1. I’m scripting in javascript and SAP scripting is in vbscript.

I have to use javascript because some expressions only work in javascript.

  1. 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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

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.

 

Regards,
  /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
================================

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

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.

 

Regards,
  /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
================================

View solution in original post

Highlighted
Community Manager

Thanks Alex!

 

@RKU_AVO have you tried what Alex is suggesting?


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get properties of a web page element

See replies!

Compare images using the Region Checkpoint

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors