code: public String savePageSource(String fileName) {
          List<WebElement> framesWithFakeSources = new ArrayList<>(2);
          Map<String, String> sourceReplacements = new HashMap<>();
          List<WebElement> frames = getFrames();
          for (WebElement frame : frames) {
              String newLocation = saveFrameSource(frame);
              if (newLocation != null) {
                  String fullUrlOfFrame = frame.getAttribute("src");
                  if (StringUtils.isEmpty(fullUrlOfFrame)) {
                      framesWithFakeSources.add(frame);
                      fullUrlOfFrame = "anonymousFrame" + frames.indexOf(frame);
                      addFakeSourceAttr(frame, fullUrlOfFrame);
                  }
  
                  addSourceReplacementsForFrame(sourceReplacements, newLocation, fullUrlOfFrame);
              }
          }
          String source = getCurrentFrameSource(sourceReplacements);
          if (!framesWithFakeSources.isEmpty()) {
              // replace fake_src by src
              source = source.replace(" " + FAKE_SRC_ATTR + "=", " src=");
              removeFakeSourceAttr(framesWithFakeSources);
          }
          return saveSourceAsPageSource(fileName, source);
      }
docs: Saves current page's source, as new file.
  @param fileName filename to use for saved page.
  @return wiki Url, if file was created inside wiki's files dir, absolute filename otherwise.