public String stSendEmailWithCaptcha(int dataId,int ExpVal,String flow )
	{		
		int actVal=1000;
		String returnVal=null;
		hm.clear();
   	hm=STFunctionLibrary.stMakeData(dataId, "Email");
   	String action = hm.get("Action");
   	
   	STCommonLibrary comLib=new STCommonLibrary();
   	
   	Vector<String> xPath=new Vector<String>();
	Vector<String> errorMsg=new Vector<String>();
	String successmsg = null;
	String captchatext = null;
	
 	try { 		
 		xPath.add(EMAIL_CANCEL_BUTTON);
 		errorMsg.add("Cancel button is not present");
 		
 		xPath.add(EMAIL_SEND_BUTTON);
 		errorMsg.add("Send Button is not present");
 		
 		comLib.stVerifyObjects(xPath, errorMsg, "STOP");
 		
 		xPath.clear();
 		errorMsg.clear();
	
	Block:
    {			        	
    	/*Click on Send or Cancel Button*/
    	if ("Send".equalsIgnoreCase(action))
    	{
    		comLib.stClick(EMAIL_SEND_BUTTON, "Send Button is not present", "STOP");
    		try {
    			Thread.sleep(5000);
    		} catch (InterruptedException e) {
    			e.printStackTrace();
    		}
    		xPath.add(EMAIL_CAPTCHA);
     		errorMsg.add("Captcha is not present");
     		
     		xPath.add(EMAIL_CAPTCHA_TEXT);
     		errorMsg.add("Captcha text is not present");
     		
     		xPath.add(EMAIL_CAPTCHA_INSERT_FIELD);
     		errorMsg.add("Captcha field is not present");
     		
     		comLib.stVerifyObjects(xPath, errorMsg, "STOP");
     		
     		xPath.clear();
     		errorMsg.clear();
     		
    		/*Checking if Error msg occurs*/    			
    		captchatext = browser.getText(EMAIL_CAPTCHA_TEXT);    		
    		System.out.println("Text : "+ captchatext);
    		
    		browser.type(EMAIL_CAPTCHA_INSERT_FIELD, captchatext);
    		try {
    			Thread.sleep(5000);
    		} catch (InterruptedException e) {
    			e.printStackTrace();
    		}
    		
    		/*IF no Error Occurs*/
    		if (browser.isElementPresent(EMAIL_CAPTCHA_SUBMIT_BUTTON))    		
    		{
    			comLib.stClick(EMAIL_SEND_BUTTON, "Send Button is not present", "STOP");
        		try {
        			Thread.sleep(5000);
        		} catch (InterruptedException e) {
        			e.printStackTrace();
        		}
        		comLib.stWaitForElement(EMAIL_SUCCESS_MSG, 20);
        		successmsg = browser.getText(EMAIL_SUCCESS_MSG);
    		
    		if(successmsg.contains("Your message was successfully shared!"))
    		{
    			actVal= 0; /*Email send successfully with Captcha.*/
    			break Block;
    		}
    		else
    		{
    			actVal= 2; /*Failed to Send email with Captcha.*/
    			break Block;
    		}
    	}
		
    }
    	else if ("Cancel".equalsIgnoreCase(action))
    	{
    		
    		comLib.stClick(EMAIL_CANCEL_BUTTON, "Cancel Button is not present", "STOP");
    		{
    			actVal= 1; /*Email Cancel successfully.*/
    			break Block;
    		}
    	}
    	
    	}  		

	}
		    	
	catch (SeleniumException sexp)
	{
		Reporter.log(sexp.getMessage());	
	} 
	
	returnVal=STFunctionLibrary.stRetValDes(ExpVal, actVal, "stSendEmailWithCaptcha",flow, hm);
	if(flow.contains("STOP")){
		assertEquals("PASS",returnVal);
	}
	return returnVal; 	
}