|
Loading...
|
marathon-testing@googlegroups.com
[Prev] Thread [Next] | [Prev] Date [Next]
[marathon-testing] Re: Tree Record Replay Issue Rahul Wed Feb 01 10:02:39 2012
Hello KD,
I'm writing the custome Resolver but its still not working,
I'm doing the below Steps.
1. Written the customeInfonodeComponentResolver, in this I had
overriden the below methods
- @Override
public boolean canHandle(Component component, Point location) {
return true;
}
- @Override
public Component getComponent(Component component, Point location) {
return (PhysicalView)getTreeComponent(component);
}
- private PhysicalView getTreeComponent(Component component){
if(component instanceof PhysicalView)
return (PhysicalView)component;
Component pView = component.getParent();
while(pView != null){
if(pView instanceof PhysicalView){
return (PhysicalView)pView;
}
pView = pView.getParent();
}
return null;
}
- @Override
public MComponent getMComponent(Component component, String name,
Object obj) {
return new MInfonodeComponent(component, name, getFinder(),
windowMonitor);
}
2. Written the MInfonodeComponent which extends the MComponent
@Override
public String getText() {
return getComponent().getName();
}
@Override
public int clickNeeded(MouseEvent e) {
return ClickAction.RECORD_CLICK;
}
@Override
public boolean recordAlways() {
return true;
}
}
when I print the name of component in the Constructor of the
MInfonodeComponent it is giving me like
"com.dassault_systemes.mmi.physicalview.PhysicalView_32" for each
click.
Also I had overriden toString() method for each of the node...Below is
the Recorded Script.
click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
click("<html><body><table border=\"0\" cellpadding=\"1\"
----------- html used for the node representation")
click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
Please let me know what wrong I'm doing here ? Or anything extra I
need to do.
Regards,
-- Rahul --
On Dec 30 2011, 9:48 am, Rahul <[EMAIL PROTECTED]> wrote:
> Thanks for the Reply,
>
> yes thePhysicalViewsubclasses the Jtree,
>
> There are Few more details of the tree as below :
>
> 1. Each node in this jtree is also of different type i.e.
> physcalviewnode which extends the DefaultMutabletreeNode
> 2. Each node is overriding the toString method
> 3. The tree is buit dynamically i.e. on selection of the first node it
> creates the child nodes depending on the Response.
>
> What contract do the Physical view follow ? could you please tell me
> so that I can do that..
>
> -- Rahul
>
> On Dec 30, 9:06 am, Dakshinamurthy Karra
>
> <[EMAIL PROTECTED]> wrote:
> > On JTree components Marathon records selects for the nodes selected and
> > programmatically expand the nodes to find the appropriate node. It might be
> > that your subclassed-JTree is not following JTree-contract, hence Marathon
> > is unable to record.
>
> > One solution to this problem is to write your own resolver to support this
> > component. Another way is to use get_component() to access the underlying
> > object and perform the operations programmatically. You can use Marathon
> > modules to reuse such methods.
>
> > -- KD
>
> > On Thu, Dec 29, 2011 at 9:33 PM, Greg Warner <[EMAIL PROTECTED]> wrote:
> > > I had a somewhat similar issue with a third-party component that
> > > subclassed JTree. In my case, I think the problem was each node of the
> > > tree wasn't returning a unique path (i.e. JTree.getSelectionPath()), so
> > > when the script was played back the wrong node was selected. I haven't
> > > found a good work around yet other than assigning keyboard shortcuts to
> > > the
> > > tree items I want to access.
>
> > > Do you know if
> > > com.dassault_systemes.mmi.physicalview.PhysicalViewsubclasses JTree?
>
> > > Greg
>
> > > On Thu, Dec 29, 2011 at 6:35 AM, Rahul <[EMAIL PROTECTED]> wrote:
>
> > >> Hello,
>
> > >> I've just started using marathon to test my applet but I'm getting the
> > >> problem with the tree
>
> > >> When I'm recording the tree below script is generated
>
> > >> def test
> > >> $java_recorded_version="1.6.0_16"
> > >> with_window("Applet Viewer:
> > >> com.dassault_systemes.mmi.MemoryModelInspector.class") {
>
> > >> click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
>
> > >> click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
>
> > >> click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
>
> > >> click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
>
> > >> click("com.dassault_systemes.mmi.physicalview.PhysicalView_32")
> > >> }
>
> > >> end
>
> > >> But when I try to replay the recoreded script it executes each line
> > >> without error but fails to do the same on UI
> > >> i.e. the tree wont get expand as I recorded.
>
> > >> Also I'm not getting any error too.
>
> > >> Thanks in Advance
>
> > >> --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "Marathon Java GUI Testing" group.
> > >> To post to this group, send email to [EMAIL PROTECTED]
> > >> To unsubscribe from this group, send email to
> > >> [EMAIL PROTECTED]
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/marathon-testing?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Marathon Java GUI Testing" group.
> > > To post to this group, send email to [EMAIL PROTECTED]
> > > To unsubscribe from this group, send email to
> > > [EMAIL PROTECTED]
> > > For more options, visit this group at
> > >http://groups.google.com/group/marathon-testing?hl=en.
>
> > --
> > -- KD
>
> > --
> > Dakshinamurthy Karra
> > CEO & Managing Director
> > Jalian Systems Pvt. Ltd.
> > #44, Maruthi Complex, CMR Road
> > 2nd Block, Kalyan Nagar
> > H.R.B.R Layout, Bengaluru - 560 043
> > INDIA
> > T: +91-80-25457305
> > W:http://www.jaliansystems.com
> > W:http://www.marathontesting.com
--
You received this message because you are subscribed to the Google Groups
"Marathon Java GUI Testing" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/marathon-testing?hl=en.
- [marathon-testing] Tree Record Replay Issue Rahul 2012/02/01
- Re: [marathon-testing] Tree Record Replay Issue Greg Warner 2012/02/01
- Re: [marathon-testing] Tree Record Replay Issue Dakshinamurthy Karra 2012/02/01
- [marathon-testing] Re: Tree Record Replay Issue Rahul 2012/02/01
- [marathon-testing] Re: Tree Record Replay Issue Rahul 2012/02/01 <=
- [marathon-testing] Re: Tree Record Replay Issue Rahul 2012/02/01
- Re: [marathon-testing] Re: Tree Record Replay Issue Dakshinamurthy Karra 2012/02/01
- [marathon-testing] Re: Tree Record Replay Issue Rahul 2012/02/01
- Re: [marathon-testing] Re: Tree Record Replay Issue Dakshinamurthy Karra 2012/02/01
- [marathon-testing] Re: Tree Record Replay Issue Rahul 2012/02/01
- Re: [marathon-testing] Re: Tree Record Replay Issue Dakshinamurthy Karra 2012/02/01