def save_page(self, path=None):
path = _prepare_path(path, "<STR_LIT:html>")<EOL>with open(path, "<STR_LIT:wb>") as f:<EOL><INDENT>f.write(encode_string(self.body))<EOL><DEDENT>return path<EOL>
Save a snapshot of the page.

If invoked without arguments, it will save a file to :data:`capybara.save_path` and the
file will be given a randomly generated filename. If invoked with a relative path, the path
will be relative to :data:`capybara.save_path`.

Args:
    path (str, optional): The path to where it should be saved.

Returns:
    str: The path to which the file was saved.