docs: @Override
  	public EmbeddedBrowser get() {
  		LOGGER.debug("Setting up a Browser");
  		// Retrieve the config values used
  		ImmutableSortedSet<String> filterAttributes =
  				configuration.getCrawlRules().getPreCrawlConfig().getFilterAttributeNames();
  		long crawlWaitReload = configuration.getCrawlRules().getWaitAfterReloadUrl();
  		long crawlWaitEvent = configuration.getCrawlRules().getWaitAfterEvent();
  
  		// Determine the requested browser type
  		EmbeddedBrowser browser = null;
  		EmbeddedBrowser.BrowserType browserType =
  				configuration.getBrowserConfig().getBrowserType();
  		try {
  			switch (browserType) {
  				case CHROME:
  					browser = newChromeBrowser(filterAttributes, crawlWaitReload, crawlWaitEvent,
  							false);
  					break;
  				case CHROME_HEADLESS:
  					browser = newChromeBrowser(filterAttributes, crawlWaitReload,
  							crawlWaitEvent, true);
  					break;
  				case FIREFOX:
  					browser = newFirefoxBrowser(filterAttributes, crawlWaitReload, crawlWaitEvent,
  							false);
  					break;
  				case FIREFOX_HEADLESS:
  					browser = newFirefoxBrowser(filterAttributes, crawlWaitReload, crawlWaitEvent,
  							true);
  					break;
  				case REMOTE:
  					browser = WebDriverBackedEmbeddedBrowser.withRemoteDriver(
  							configuration.getBrowserConfig().getRemoteHubUrl(), filterAttributes,
  							crawlWaitEvent, crawlWaitReload);
  					break;
  				case PHANTOMJS:
  					browser =
  							newPhantomJSDriver(filterAttributes, crawlWaitReload, crawlWaitEvent);
  					break;
  				default:
  					throw new IllegalStateException("Unrecognized browser type "
  							+ configuration.getBrowserConfig().getBrowserType());
  			}
  		} catch (IllegalStateException e) {
  			LOGGER.error("Crawling with {} failed: " + e.getMessage(), browserType.toString());
  			throw e;
  		}
  
  		/* for Retina display. */
  		if (browser instanceof WebDriverBackedEmbeddedBrowser) {
  			int pixelDensity =
  					this.configuration.getBrowserConfig().getBrowserOptions().getPixelDensity();
  			if (pixelDensity != -1)
  				((WebDriverBackedEmbeddedBrowser) browser).setPixelDensity(pixelDensity);
  		}
  
  		plugins.runOnBrowserCreatedPlugins(browser);
  		return browser;
  	}