Open GoogleCodeExporter opened 9 years ago
Hi Falk,
Could you add a minimal test case for this issue?
Regards,
Fred
Original comment by fred.g...@googlemail.com
on 28 Nov 2012 at 1:06
Hi Falk,
I attached a simple test case for your issue.
Apparently the new ".containedIn()" method that was added in
https://code.google.com/p/windowtester/issues/detail?id=11 already does what
you want (see attached test case).
Please check if this works for you and report back.
Regards,
Fred
Original comment by fred.g...@googlemail.com
on 10 Dec 2012 at 12:27
Attachments:
Hi Fred,
sorry that i missed the test case for this issue.
I will try this and report you if it works - but i think it seems to be a
possible way :)
Original comment by falk.z...@gmail.com
on 10 Dec 2012 at 10:00
It didn't worked :(
Tried following different lines:
FilteredTreeItemLocator tree = new
FilteredTreeItemLocator("Root_Element/Leaf").containedIn(new
ViewLocator("OurView"));
FilteredTreeItemLocator tree = ((SWTWidgetLocator) new
FilteredTreeItemLocator("Root_Element/Leaf").containedIn(new
SWTWidgetLocator(OurSpecialFilteredTree.class))).containedIn(new
ViewLocator("OurView"));
It fails with following error message:
com.windowtester.runtime.MultipleWidgetsFoundException: Multiple Widgets Found:
looking for
FilteredTreeLocator()
and found:
TreeReference - Tree {}
TreeReference - Tree {}
Best regards,
Falk
Original comment by falk.z...@gmail.com
on 10 Dec 2012 at 12:41
Hi Falk,
I guess you have more than one of the FilteredTrees inside of your view.
Then you could use the .containedIn(int, SWTWidgetLocator) method and set the
first parameter to 0 or 1 depending on whether you want the first or the second
tree.
HTH,
Fred
Original comment by fred.g...@googlemail.com
on 12 Dec 2012 at 12:27
Didn't work :(
Don't know where it goes wrong - i tried to debug it but couldn't get the right
information.
Last Breakpoint in line 211 TreeItemLocator after that point the test reaches
the exception output.
Original comment by falk.z...@gmail.com
on 14 Dec 2012 at 12:27
[deleted comment]
Hi Falk,
Can you provide a minimal test case that can be used to reproduce the error
you're currently seeing? Otherwise I'm only fishing in muddy waters. ;)
Regards,
Fred
Original comment by fred.g...@googlemail.com
on 29 Dec 2012 at 6:56
Hey Fred :)
Made some DummyRCP Application today which uses our structure for the view - i
attached the eclipse project as zip and here is my test case for that:
public class TestingTheDummy extends UITestCaseSWT {
/* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
IUIContext ui = getUI();
ui.ensureThat(new WorkbenchLocator().hasFocus());
}
/**
* Main test method.
*/
public void testTestingTheDummy() throws Exception {
IUIContext ui = getUI();
ui.click(new FilteredTreeItemLocator("Habelman", new ViewLocator("DummyTest.view")));
new DebugHelper().printWidgets();
}
}
Hope it will work for you to test :)
Regards,
Falk
Original comment by falk.z...@gmail.com
on 4 Jan 2013 at 10:02
Attachments:
Hi Falk,
Thanks for the test project and the test class.
The test class works for me without any problems.
I guess it also works for you?
I had to add a second view with the same filtered tree to see the problem
you've described ("Multiple Widgets Found").
In this case the containedIn() method does indeed not work as expected.
I found a workaround though:
ui.click(new FilteredTreeItemLocator("Habelman", 0, new
ViewLocator("DummyTest.view")));
It magically works when you specify an index. This is still a bug, because it
doesn't
seem to matter which index you provide ("1" also works!).
I will try to take a closer look at both bugs over the weekend.
Regards,
Fred
Original comment by fred.g...@googlemail.com
on 9 Jan 2013 at 12:42
Hi Fred,
yes you are right the problem begins with two views.
I thought i had tested it with an index .. but ok see you found different
problems maybe it works after that - how is the progress so far ?
Regards,
Falk
Original comment by falk.z...@gmail.com
on 14 Jan 2013 at 9:53
Original issue reported on code.google.com by
falk.z...@gmail.com
on 23 Nov 2012 at 12:28Attachments: