function phantomjs(language) {
		let displayLanguage = language === "" ? "en" : language;
		let promise = new Promise((resolve, reject) => {
			return phantom.createAsync().then((phantom) => {
				return phantom.createPageAsync();
			}).then((objects) => {
				console.log("Setting viewportSize..");
				return objects.page.setAsync('viewportSize', {
					width: pageWidth,
					height: pageHeight
				});
			}).then((objects) => {
				console.log("Opening " + httpServer + "?locale=" + language + " for " + displayLanguage);
				return objects.page.openAsync(httpServer + "?locale=" + language);
			}).then((objects) => {
				console.log("Rendered HTML, the image will be saved after 2 seconds.");
				if (objects.ret[0] != "success") {
					throw objects.ret[0];
				}
				return timeout(2000).then(() => {
					return objects.page.renderAsync(path.join(__dirname, 'Web Front End Stack' + (language === "" ? "" : ".") + language + '.png'));
				});
			}).then((objects) => {
				console.log("The image(" + displayLanguage + ") saved successfully!");
				objects.page.close();
				objects.phantom.exit();
				resolve();
			});
		});
		return promise;

	}
For running phantomjs to take a screenshot for the webpage
@return Promise<any>