public String stSendOrCancelEmail1(int dataId,int ExpVal,String flow )
	{		
		int actVal=1000;
		String returnVal=null;
		hm.clear();
   	hm=STFunctionLibrary.stMakeData(dataId, "Email");
   	String action = hm.get("Action");
   	String widgetType=hm.get("WidgetType");
   	
   	STCommonLibrary comLib=new STCommonLibrary();
   	
   	Vector<String> xPath=new Vector<String>();
	Vector<String> errorMsg=new Vector<String>();
	String successmsg = "";
	String errormsg = "";
	
 	try {
 		if(widgetType.equalsIgnoreCase("OAuth"))
 		{
 	 	 xPath.add(OAUTH_WIDGET_SHARE_BUTTON);
 	 	 errorMsg.add("Share Button is not present on WIdget");	
 			
 		}else
 		{
 		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:
    {		
 		/* Executing Tests if widget type is OAuth */
 		if(widgetType.equalsIgnoreCase("OAuth"))
 		{
 			comLib.stClick(OAUTH_WIDGET_SHARE_BUTTON, "Send Button is not present", "STOP");
 			
 			/* Wait for processing */
 			try {
    			Thread.sleep(10000);
    		} catch (InterruptedException e) {
    			e.printStackTrace();
    		}
    		
    		
    		}
    		
    		/* If no error messages appear on WIdget and email share is successful */
    		if(browser.isElementPresent(OAUTH_WIDGET_DONE_SCREEN))
    		{
    			/* Grabbing message on Done screen */
    			String successMsg=browser.getText(OAUTH_WIDGET_DONE_SCREEN_MESSAGE);
    			if(successMsg.equalsIgnoreCase("Your message was successfully shared!"))
    			{
    			actVal= 0; /*Email send successfully.*/
    			System.out.println(successMsg);
    			break Block;
    			
    			}
    					
    		} else  
    		{
    			if(browser.isElementPresent(OAUTH_WIDGET_CAPTCHA_SCREEN))
    			{
    			actVal= 3; /*Failed to Send or Cancel email.*/
    	    	break Block;
    			}
    			else
        		/* log for failure */
    			{
        		actVal= 2; /*Failed to Send or Cancel email.*/
        		break Block;
        		}
    		}
    }
 	}
   	
	catch (SeleniumException sexp)
	{
		Reporter.log(sexp.getMessage());	
	} 
	
	returnVal=STFunctionLibrary.stRetValDes(ExpVal, actVal, "stSendOrCancelEmail1",flow, hm);
	if(flow.contains("STOP")){
		assertEquals("PASS",returnVal);
	}
	return returnVal; 
}