Page.saveScreenshot uses filepath to infer screenshot type (either PNG of JPG) and saves the screenshot to file system.
With this patch, page has two methods to include javascript: - Page.addScriptTag(url) which is similar to phantom's includeJs. - Page.injectFile(filePath) which is similar to phantom's injectJs.