Highlighted
Absent Member.
Absent Member.
369 views

Synchronization issue with SAP session1 and session2 using QTP/UFT automation

Hi Guys,

 I am using UFT to automate SAP application. My scenario is to automate the SAP Mail creation using the SWBP transaction. During the execution of the script while clicking the New Message button then new SAP session should open and need to compose the mail. But, got the error New Message button during the execution. Below is my script

 

Creating a description object for SAP session

  Set sSAPSession = Description.Create()

  'Add descriptions and properties for SAP session

  sSAPSession("guicomponenttype").value = "12"

  sSAPSession("name").value = "ses\[0\]"

 

SAPGuiSession(sSAPSession).SAPGuiWindow("name:=wnd[0\]","type:=GuiMainWindow").SAPGuiOKCode("name:=okcd","type:=GuiOkCodeField").Set "SBWP"

  SAPGuiSession(sSAPSession).SAPGuiWindow("name:=wnd\[0\]","type:=GuiMainWindow").SAPGuiButton("name:=btn\[0\]","type:=GuiButton").Click

  SAPGuiSession(sSAPSession).SAPGuiWindow("guicomponenttype:=21","transaction:=SBWP").SAPGuiButton("name:=btn\[16\]","text:=New message").Click

 

  SAPGuiSession("guicomponenttype:=12","name:=ses\[1\]").SAPGuiWindow("guicomponenttype:=21","text:=Create Document and Send").Activate

 

 

 

=========Error during the runtime =======

Cannot find the "[ SAPGuiWindow ]" object's parent "[ SAPGuiSession ]" (class SAPGuiSession). Verify that parent properties match an object currently displayed in your application.

 

 

Line (20): "SAPGuiSession("guicomponenttype:=12","name:=ses\[1\]").SAPGuiWindow("guicomponenttype:=21","text:=Create Document and Send").Activate".

 

=====================================

 

Please give u r suggestions to resolve the issue ..

 

Thanks

kathirvel Nagaraj

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.