private void newBrowserPerPercentage(String iePercentage,
			String firefoxPercentage, String chromePercentage, int testCaseCount, String onGrid)
			throws Exception {
		log.info("Setting up browser per percentage: ie=" + iePercentage
				+ " firefox=" + firefoxPercentage + " chrome="
				+ chromePercentage + " test case count=" + testCaseCount);
		// Convert the percentage to float
		float iePercent = new Float(iePercentage.substring(0,
				iePercentage.indexOf("%"))) / 100;
		float firefoxPercent = new Float(firefoxPercentage.substring(0,
				firefoxPercentage.indexOf("%"))) / 100;

		// Get the rounded ieMaxCount, if ieMaxCount<1, plus 1
		int ieMaxCount = Math.round(iePercent * testCaseCount);
		if (ieMaxCount < 1) {
			ieMaxCount = 1;
		}
		// Get the rounded firefoxMaxCount, if ieMaxCount<1, plus 1
		int firefoxMaxCount = Math.round(firefoxPercent * testCaseCount);
		if (firefoxMaxCount < 1) {
			firefoxMaxCount = 1;
		}
		// Get the chromeMaxCount by math
		int chromeMaxCount = testCaseCount - ieMaxCount - firefoxMaxCount;
		
		// set up the browser by the specified percentage
		if (ieCountCurrent < ieMaxCount) {
			setUpIEWin32(onGrid);
			browserFlag = "ie";
			ieCountCurrent++;
		} else if (ieCountCurrent == ieMaxCount
				&& firefoxCountCurrent < firefoxMaxCount) {
			setUpFirefoxWithDefaultProfile(onGrid);
			browserFlag = "firefox";
			firefoxCountCurrent++;
		} else if (ieCountCurrent == ieMaxCount
				&& firefoxCountCurrent == firefoxMaxCount
				&& chromeCountCurrent < chromeMaxCount) {
			setUpChromeWin32(onGrid);
			browserFlag = "chrome";
			chromeCountCurrent++;
		} else {
			throw new Exception("The current ieCount:" + ieCountCurrent
					+ ", firefoxCount:" + firefoxCountCurrent
					+ "and chromeCount: " + chromeCountCurrent
					+ " doesn't fit the conditions");
		}

		log.info("ie Count Current=" + ieCountCurrent);
		log.info("ie Count Max=" + ieMaxCount);
		log.info("firefox Count Current=" + firefoxCountCurrent);
		log.info("firefox Count Max=" + firefoxMaxCount);
		log.info("googlechrome Count Current=" + chromeCountCurrent);
		log.info("googlechrome Count Max=" + chromeMaxCount);
	}