Micro Focus QTP (UFT) Forums
Fetch all objects from sapgui window - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Fetch all objects from sapgui window (/Thread-Fetch-all-objects-from-sapgui-window)



Fetch all objects from sapgui window - manishnangalia - 08-17-2012

Need to get all objects in sapguiwindow along with its class name[/align]


RE: Fetch all objects from sapgui window - manishnangalia - 08-17-2012

can any one help out for the same...


RE: Fetch all objects from sapgui window - savitripatil - 08-18-2012

are you not able to add all the child objects along with your parent object..


RE: Fetch all objects from sapgui window - manishnangalia - 08-21-2012

I have some labels and some values are present in it, what i need to do is i need to search the value i have in my input file and click on it acc.


RE: Fetch all objects from sapgui window - Ankesh - 08-21-2012

hey you could use the find option. Once you find the item on page, you coulde use the sendkey method. Chk the sample code.

Code:
SAPGuiSession("Session").SAPGuiWindow("SAP Directories").SendKey CTRL_F
SAPGuiSession("Session").SAPGuiWindow("Find_3").SAPGuiEdit("Find").Set "Your search value" //Enter the value to be searched
SAPGuiSession("Session").SAPGuiWindow("Find_3").SAPGuiButton("Find   (Enter)").Click
SAPGuiSession("Session").SAPGuiWindow("Find_4").SAPGuiLabel("Object").SetFocus //Set focus on the onject
SAPGuiSession("Session").SAPGuiWindow("Find_4").SAPGuiLabel("Object").SetCaretPos 12
SAPGuiSession("Session").SAPGuiWindow("Find_4").SendKey F2//Click on the object

Let me know if this helps.


RE: Fetch all objects from sapgui window - manishnangalia - 08-28-2012

thanks it worked....


RE: Fetch all objects from sapgui window - Ankesh - 08-28-2012

hey please make sure you add the objects properly. Here object is the label which will apper in the find window if serach was successful. This object will remain same for all.

Just add the object and run it.