code: public Player play(InputStream is, File file, String[] testCases, Map<String, Object> properties) throws IOException {
          ExecutionContext context = ExecutionContextFactory.getInstance().create(null, null, file, file.getParentFile().getCanonicalPath());
          TestSuite suite = parser.parse(context, is, file.getCanonicalPath());
          suite.setProperties(properties);
          if (parser.getErrors().size() > 0) {
  			throw new ParseException(parser.getErrors());
  		}
          log.debug("Launching test suite: " + suite.getName());
          Set<String> testCasesSet = testCases == null || testCases.length == 0 ? null : new HashSet<String>(Arrays.asList(testCases));
          boolean appStarted = false;
          for (TestCase testCase : suite.getTestCases()) {
              if (testCasesSet != null && !testCasesSet.contains(testCase.getName())) {
  				continue;
  			}
              if ((!appStarted || !singleInstanceMode) && classToRun != null) {
                  runSwingMain(classToRun, classToRunArgs);
                  appStarted = true;
              }
              log.debug("Launching test case: " + testCase.getName());
              ExecutionContext testCaseEC = testCase.getExecutionContext();
              testCaseEC.setPlayer(this);
              testCaseEC.setTestCase(testCase);
              play(testCaseEC);
              if ((appStarted && !singleInstanceMode) && classToRun != null) {
                  closeWindows();
                  appStarted = false;
              }
          }
          return this;
      }
docs: Plays a script.
  
  @param is The input stream from where to read the script
  @param file The originating file, may be null
  @param testCases The names of the test cases to play, if null or empty all test cases are played
  @return The player
  @throws IOException in case there is an error reading the file