Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

abbot.finder.swt.WidgetNotFoundException

Developers
2005-12-08
2013-05-20
  • Hi,

    I've been trying to perform the abbot.swt.eclipse.tests.JavaProjectTester test case since yesterday, but it does not always execute succesfully. Without any modification between two tries, sometimes the test passes, and sometimes it doesn't. In latter case, I get the exception below. Does it mean that the test tries to click on an item that has not been displayed yet ? Could it be caused by the actual CPU load that could cause GUI events to be delayed ?

    Thanks for your help,

    Sebastien

    Exception thrown at  abbot.finder.swt.BasicFinder.find(BasicFinder.java:224)
        at abbot.finder.swt.BasicFinder.find(BasicFinder.java:153)
        at abbot.finder.swt.BasicFinder.find(BasicFinder.java:141)
        at abbot.tester.swt.TreeItemTester.resolveAndClickItem(TreeItemTester.java:785)
        at abbot.tester.swt.TreeItemTester.actionClickTreeItemByPathImp(TreeItemTester.java:754)
        at abbot.tester.swt.TreeItemTester.access$000(TreeItemTester.java:48)
        at abbot.tester.swt.TreeItemTester$13.run(TreeItemTester.java:692)
    : abbot.finder.swt.WidgetNotFoundException: Widget NOT Found:
    Text matcher (Java) (caught at  abbot.tester.swt.TreeItemTester$13.run(TreeItemTester.java:705))
    abbot.finder.swt.WidgetNotFoundException: Widget NOT Found:
    Text matcher (Java)
        at abbot.finder.swt.BasicFinder.find(BasicFinder.java:224)
        at abbot.finder.swt.BasicFinder.find(BasicFinder.java:153)
        at abbot.finder.swt.BasicFinder.find(BasicFinder.java:141)
        at abbot.tester.swt.TreeItemTester.resolveAndClickItem(TreeItemTester.java:785)
        at abbot.tester.swt.TreeItemTester.actionClickTreeItemByPathImp(TreeItemTester.java:754)
        at abbot.tester.swt.TreeItemTester.access$000(TreeItemTester.java:48)
        at abbot.tester.swt.TreeItemTester$13.run(TreeItemTester.java:692)

     
    • abbotuser01
      abbotuser01
      2006-01-03

      Hi,

      Has there been any progress in fixing the WidgetNotFoundExceptions that occur while running a few of the tests in abbot.swt.eclipse.tests (such as for example MultiPageWizardExampleTest)?  My test cases include several tests that are similar to these sample tests where items in a tree need to be selected to invoke appropriate dialogs.  But, due to the WidgetNotFoundExceptions I am unable to proceed any further.

      Is there a time frame by when these errors will be fixed?

      Thanks

       
      • Hi all,

        As I use Eclipse 3.0.2, I cannot use the latest release of Abbot, so I have to modify the last version available that is consistent with Eclipse 3.0.X (included in 1.0RC1). Basically, I performed a few changes so that the code is more robust : The impacted class is TreeItemTester. I changed the resolveAndClickItem method to replace :
        item = (TreeItem) finder.find(parentTree, new TextMatcher(text));
        by :
        item = (TreeItem) finder.find(parentTree, new TextMatcher(text, TreeItem.class));

        I also changed the removeWatcher method to check that a widget has not been disposed (in case of a double click that would close a dialog for example) :
        The code looks like :
        if (!tree.isDisposed()) {
             result = ((Boolean) Robot.syncExec(tree.getDisplay(),
        ...
        ...
        }
        return result;

        Now it works fine.

        Sebastien