File tree Expand file tree Collapse file tree
testar/src/org/testar/monkey Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454import org .testar .monkey .alayer .Verdict ;
5555import org .testar .monkey .alayer .Widget ;
5656import org .testar .monkey .alayer .exceptions .ActionFailedException ;
57+ import org .testar .monkey .alayer .exceptions .WidgetNotFoundException ;
5758import org .testar .serialisation .LogSerialiser ;
5859
5960public class ReplayMode {
@@ -177,11 +178,16 @@ public void runReplayLoop(DefaultProtocol protocol) {
177178 actionHasWidgetAssociated = true ;
178179 Widget w ;
179180 for (Finder f : targets ){
180- w = f .apply (state );
181- if (w != null ){
182- //Can be this the widget the one that we want to find?
183- if (widgetStringToFind .equals (w .get (Tags .Title , "" )))
184- widgetTitleFound = true ;
181+ try {
182+ w = f .apply (state );
183+ if (w != null ){
184+ //Can be this the widget the one that we want to find?
185+ if (widgetStringToFind .equals (w .get (Tags .Title , "" )))
186+ widgetTitleFound = true ;
187+ }
188+ } catch (WidgetNotFoundException e ) {
189+ LogSerialiser .log ("WidgetNotFoundException when trying to replay the widget: " + widgetStringToFind + "\n " ,
190+ LogSerialiser .LogLevel .Critical );
185191 }
186192 }
187193 }
You can’t perform that action at this time.
0 commit comments