4747import org .testar .monkey .alayer .ios .IOSProtocolUtil ;
4848import org .testar .monkey .alayer .visualizers .ShapeVisualizer ;
4949import org .testar .monkey .alayer .webdriver .WdProtocolUtil ;
50+ import org .testar .monkey .alayer .windows .UIARoles ;
5051import org .testar .monkey .alayer .windows .WinApiException ;
5152import org .testar .oracles .Oracle ;
5253import org .testar .oracles .OracleSelection ;
@@ -534,10 +535,6 @@ void endTestSequence(){
534535 cv .release ();
535536 ScreenshotSerialiser .exit ();
536537 TestSerialiser .exit ();
537- // String stopDateString = Util.dateString(DATE_FORMAT);
538- // String durationDateString = Util.diffDateString(DATE_FORMAT, startOfSutDateString, stopDateString);
539- // LogSerialiser.log("TESTAR stopped execution at " + stopDateString + "\n", LogSerialiser.LogLevel.Critical);
540- // LogSerialiser.log("Test duration was " + durationDateString + "\n", LogSerialiser.LogLevel.Critical);
541538 LogSerialiser .flush ();
542539 LogSerialiser .finish ();
543540 LogSerialiser .exit ();
@@ -928,23 +925,22 @@ private Verdict suspiciousStringValueMatcher(Widget w) {
928925 String tagValue = "" ;
929926 // First finding the Tag that matches the TagsToFilter string, then getting the value of that Tag:
930927 for (Tag <?> tag : w .tags ()){
928+ // Ignore the ValuePattern tag for UIAEdit widgets
929+ if (tag .name ().equals ("ValuePattern" ) && w .get (Tags .Role , Roles .Widget ).equals (UIARoles .UIAEdit )) {
930+ continue ;
931+ }
932+
931933 if (w .get (tag , null ) != null && tag .name ().equals (tagForSuspiciousOracle )){
932934 // Force the replacement of new line characters to avoid the usage of (?s) regex in the regular expression
933935 tagValue = w .get (tag ).toString ().replace ("\n " , " " ).replace ("\r " , " " );
934936 break ;
935- //System.out.println("DEBUG: tag found, "+tagToFilter+"="+tagValue);
936937 }
937938 }
938939
939940 //Check whether the Tag value is empty or null
940941 if (tagValue == null || tagValue .isEmpty ())
941942 continue ; //no action
942943
943- //Ignore value ValuePattern for UIAEdit widgets
944- if (tagValue .equals ("ValuePattern" ) && w .get (Tags .Role , Roles .Widget ).toString ().equalsIgnoreCase ("UIAEdit" )) {
945- continue ;
946- }
947-
948944 m = this .suspiciousTitlesMatchers .get (tagValue );
949945 if (m == null ){
950946 m = this .suspiciousTitlesPattern .matcher (tagValue );
@@ -1016,7 +1012,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
10161012 return actions ;
10171013 }
10181014
1019- //TODO is this process handling Windows specific? move to SystemProcessHandling
10201015 /**
10211016 * If unwanted processes need to be killed, the action returns an action to do that. If the SUT needs
10221017 * to be put in the foreground, then the action that is returned is putting it in the foreground.
@@ -1026,8 +1021,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
10261021 * @return null if no preSelected actions are needed.
10271022 */
10281023 protected Set <Action > preSelectAction (SUT system , State state , Set <Action > actions ){
1029- //Assert.isTrue(actions != null && !actions.isEmpty());
1030-
10311024 // TESTAR didn't find any actions in the State of the SUT
10321025 // It is set in a method actionExecuted that is not being called anywhere (yet?)
10331026 if (actions .isEmpty ()){
0 commit comments