Re: Facing problem in selecting nodes in Java tree.
1. Try following to get the tree node exist in the JavaTree * ** item_count = JavaTree_Obj.GetItemsCount* * ** For j = 0 to item_count -1* * **If JavaTree_Obj.getitem(j) = expNodeName Then* * **Result= j-1* * **Exit for* * ** End If* * ** Next* 2. If above condition exist then you will get the actual node position i.e. # j then try selecting using normal method *JavaTree_Obj.Select #0;# j-1* or use *JavaTree_Obj.Activate#0;# j-1* 3. to right click on the selected node after using above method try following * **Set WshShell = CreateObject(WScript.Shell) * * **WshShell.SendKeys ^+{F10}* I guess for Java add-in there is setting that will toggle the Select method selection i.e. NodeID or NodeName, try to google and get the info, if i get info i will let you know. hope above will work for you. -Shirish On Sat, Nov 6, 2010 at 3:27 PM, Amit Pandey amitvpandey1...@gmail.comwrote: Hi Ankit, Bhavin, I am facing below issues - 1. I want to select the nodes present in the Java Tree ( Pls find the attached snap). I have already tried .Select Parentnodes;Childnodes but it is not working. FYI, I am trying to resolve this thrugh recording. Browser(Cramer6: deuser @ Cramer62).Page(Cramer6: deuser @ Cramer62).Frame(ResourceBrowser).JavaApplet(ScriptableResourceBrowserApple_2).JavaApplet(ResourceBrowserApplet).JavaTree(BrowserTreePane$BrowserTree).Select #0;#0 2. I also want to Right Click on the Selected nodes. 3. I want to check whether the particular nodes is appearing under Javatree after creation. Pls guide asap or let me know the contact no of the person who knows the solution. I can give a call for discussion. Thanks Amit On Fri, Nov 5, 2010 at 1:06 AM, bhavin v patel bhavi...@gmail.com wrote: For JavaTree , You can first count number of node items using counter=JavaWindow(x).JavaDialog(x).JavaTree(x).GetROProperty(items count) ' you need to spy on object property and find out which method is giving you actual count then using counter ReDim selectItem(coutner) for i=0 to counter-1 selectItem(i)=JavaWindow(x).JavaDialog(x).JavaTree(x).getItem(i) JavaWindow(x).JavaDialog(x).JavaTree(x).Select(selectItem(i)) Next you can also directly select item in javatree like JavaWindow(x).JavaDialog(x).JavaTree(x).Select any value in node with Hierarchy for example If you have Javatree like below Your Name Your First Name Your Last Name you can select JavaWindow(x).JavaDialog(x).JavaTree(x).Select Your Name;Your First Name;Your Last Name Let me know if you need any more help. On Nov 4, 1:54 pm, Aniket Gadre aniket@gmail.com wrote: Please elaborate your problem. On Thu, Nov 4, 2010 at 7:40 PM, Amit amitvpandey1...@gmail.com wrote: Hi, Can anyone pls guide me how to select the nodes in Java Tree. Thanks Amit -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com mercuryqtp%2bunsubscr...@googlegroups.commercuryqtp%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- Best Regards, Aniket Gadre Senior SME - Test Automation Amdocs , Pune. E-add: aniket.ga...@amdocs.com -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
Re: Facing problem in selecting nodes in Java tree.
Please check your QTP settings Go to* Tools-Option- Java Tab* In Record Items mode section select radio button for *JavaTree *as* By name*instead of *By index* This will select Node by name not by index. Enjoy -Shirish On Sat, Nov 13, 2010 at 11:28 PM, Shirish Kabade shirish1...@gmail.comwrote: 1. Try following to get the tree node exist in the JavaTree * ** item_count = JavaTree_Obj.GetItemsCount* * ** For j = 0 to item_count -1* * **If JavaTree_Obj.getitem(j) = expNodeName Then* * **Result= j-1* * **Exit for* * ** End If* * ** Next* 2. If above condition exist then you will get the actual node position i.e. # j then try selecting using normal method *JavaTree_Obj.Select #0;# j-1* or use *JavaTree_Obj.Activate#0;# j-1* 3. to right click on the selected node after using above method try following * **Set WshShell = CreateObject(WScript.Shell) * * **WshShell.SendKeys ^+{F10}* I guess for Java add-in there is setting that will toggle the Select method selection i.e. NodeID or NodeName, try to google and get the info, if i get info i will let you know. hope above will work for you. -Shirish On Sat, Nov 6, 2010 at 3:27 PM, Amit Pandey amitvpandey1...@gmail.comwrote: Hi Ankit, Bhavin, I am facing below issues - 1. I want to select the nodes present in the Java Tree ( Pls find the attached snap). I have already tried .Select Parentnodes;Childnodes but it is not working. FYI, I am trying to resolve this thrugh recording. Browser(Cramer6: deuser @ Cramer62).Page(Cramer6: deuser @ Cramer62).Frame(ResourceBrowser).JavaApplet(ScriptableResourceBrowserApple_2).JavaApplet(ResourceBrowserApplet).JavaTree(BrowserTreePane$BrowserTree).Select #0;#0 2. I also want to Right Click on the Selected nodes. 3. I want to check whether the particular nodes is appearing under Javatree after creation. Pls guide asap or let me know the contact no of the person who knows the solution. I can give a call for discussion. Thanks Amit On Fri, Nov 5, 2010 at 1:06 AM, bhavin v patel bhavi...@gmail.comwrote: For JavaTree , You can first count number of node items using counter=JavaWindow(x).JavaDialog(x).JavaTree(x).GetROProperty(items count) ' you need to spy on object property and find out which method is giving you actual count then using counter ReDim selectItem(coutner) for i=0 to counter-1 selectItem(i)=JavaWindow(x).JavaDialog(x).JavaTree(x).getItem(i) JavaWindow(x).JavaDialog(x).JavaTree(x).Select(selectItem(i)) Next you can also directly select item in javatree like JavaWindow(x).JavaDialog(x).JavaTree(x).Select any value in node with Hierarchy for example If you have Javatree like below Your Name Your First Name Your Last Name you can select JavaWindow(x).JavaDialog(x).JavaTree(x).Select Your Name;Your First Name;Your Last Name Let me know if you need any more help. On Nov 4, 1:54 pm, Aniket Gadre aniket@gmail.com wrote: Please elaborate your problem. On Thu, Nov 4, 2010 at 7:40 PM, Amit amitvpandey1...@gmail.com wrote: Hi, Can anyone pls guide me how to select the nodes in Java Tree. Thanks Amit -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com mercuryqtp%2bunsubscr...@googlegroups.commercuryqtp%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- Best Regards, Aniket Gadre Senior SME - Test Automation Amdocs , Pune. E-add: aniket.ga...@amdocs.com -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to
Re: Facing problem in selecting nodes in Java tree.
can you send the screenshot of Java Tree, Did you try with record mode once or DP once. Regards, Kiran Edupuganti On Thu, Nov 4, 2010 at 10:10 AM, Amit amitvpandey1...@gmail.com wrote: Hi, Can anyone pls guide me how to select the nodes in Java Tree. Thanks Amit -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.commercuryqtp%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- Kiran Edupuganti M.no: 9866424362 -- You received this message because you are subscribed to the Google QTP - HP Quick Test Professional - Automated Software Testing group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to mercuryqtp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en