Getting child objects in SAP - 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: Getting child objects in SAP (/Thread-Getting-child-objects-in-SAP) |
Getting child objects in SAP - Shridevi.Salagare - 10-20-2011 Hi, How to get child objects in SAP. I want to check all the checkboxes opened in a pop-up.(Count is varying).How to handle this situation? RE: Getting child objects in SAP - MVChowdary - 10-20-2011 Can you paste the SAP screen shot for selecting check boxes. Can you paste SAP screen shot RE: Getting child objects in SAP - Shridevi.Salagare - 10-20-2011 Screenshot RE: Getting child objects in SAP - MVChowdary - 10-20-2011 Try with the following code/method. Code: Obj="provide required screen/object name" RE: Getting child objects in SAP - Shridevi.Salagare - 10-20-2011 Thanks MVChowdary. But, I need to set all checkboxed value as ON. And I cant add the checkbox to Object repository as number s not fixed. In that case can the script given by you will work? RE: Getting child objects in SAP - Ankesh - 10-20-2011 Hi Shridevi, U can use descriptive programming for this. Use the FindAllByID property of the object. Usually id will have soem values like /app/con[0]/ses[0]/wnd[1]/usr/sub:ZC_RMSERIDR1:0200/chkI_ZMFCANC-FLAG[0,0] Usually one of the values at last (here [0,0]) will change(Usually incremented by one). Chk which values is changing so that u can use a counter for that. In my case the first value is changing(incremented by 1) and the second one remains same. Use the below code once u identify the changes.... Code: intStartIndex=0 'As this the start index for my object. This might chanse. Please initialize as per ur object Do let me know if it works. Regards, Ankesh 'Descriptin of the below line... Parameters passed in FindAllByName methods are Code: FindAllByName(<ObjectName>,<type>). In sap , the object name remains same for all the checkboxes(as per the scrinshot). Code: Set ObjCount=SAPGuiSession("Session").SAPGuiWindow("Select the serial Numbers").Object.FindAllByName("I_ZMFCANC-FLAG","GuiCheckBox") RE: Getting child objects in SAP - Shridevi.Salagare - 10-20-2011 Hi Ankesh, The code worked fine. Thansk a lot for you time. RE: Getting child objects in SAP - syoutaikon - 08-15-2013 Hi, This problem also happened when i tried to get child objects. My problem is: 1. the checkbox doesn't have a "name" property, it meas its name is empty, so i couldn't use "findbyname" 2. the id of the checkbox isn't permanent, so i couldn't use "findbyid" 3. meanwhile, i want to check both of the checkboxes Following is my code: Code: set DDPDescription = description.Create Could anyone help me, plz? Hi, I changed my code as below: Code: Set DDPDescription = nothing Code: childDDPObject(i).GetROPorperty("content") = "DDP" RE: Getting child objects in SAP - Ankur - 08-15-2013 Please open a new thread for your query. |