code: public void selectFrame(int frameNumber) {
          String action = "Switching to frame <b>" + frameNumber + "</b>";
          String expected = FRAME + frameNumber + AVAILABLE;
          try {
              driver.switchTo().frame(frameNumber);
          } catch (Exception e) {
              reporter.fail(action, expected, FRAME + frameNumber + NOT_SELECTED + ". " + e.getMessage());
              log.warn(e);
              return;
          }
          reporter.pass(action, expected, expected);
      }
docs: Select a frame by its (zero-based) index. That is, if a page has three
  frames, the first frame would be at index 0, the second at index 1 and
  the third at index 2. Once the frame has been selected, all subsequent
  calls on the WebDriver interface are made to that frame.
  
  @param frameNumber - the frame number, starts at 0