Q:

How can i add the drop-down select function in automation framework?

I am new to Selenium WebDriver. So, I started to build a keyword based automation framework and successfully built that and working fine. But now, I stuck in a case, where I need to select the value from the drop-down. I am aware of the select function and which I can use in scripting method. But in framework, I have created a file UIOperation.java in which I have created few methods like CLICK, SETTEXT, WAIT, etc.
So, How can I add the code for Select function in the same file?
I have tried below code, but it's not working.
case "SELECT":
    //Perform select from drop-down
    driver.findElement(this.getObject(p, objectName, objectType))).selectByVisibleText(value);
    break;

Below I have mentioned a few methods, need to create same for Select method.
public class UIOperation {

     WebDriver driver;
        public UIOperation(WebDriver driver){
            this.driver = driver;
        }
        public void perform(Properties p,String operation,String objectName,String objectType,String value) throws Exception{
            System.out.println("");
            switch (operation.toUpperCase()) {
            case "CLICK":
                //Perform click
                driver.findElement(this.getObject(p,objectName,objectType)).click();
                break;
            case "SETTEXT":
                //Set text on control
                driver.findElement(this.getObject(p,objectName,objectType)).sendKeys(value);
                break;

I am executing the case using TestNG. In the excel file, I am adding the Keywords (i.e. Click, Settext, Wait, etc.), Object, ObjectType and Value. (In ObjectProperties, I have defined the Objects and their ObjectTypes like XPath, id, name, etc.) I tried to select the drop-down value by using Click keyword and unable to select the option for the same.

A:

driver.findElement returns an WebElement object which doesn't have the method selectByVisibleText.   
To use selectByVisibleText The WebElement have to be a <select> tag and you have to use org.openqa.selenium.support.ui.Select. 
Try this:
case "SELECT":
    //Perform select from drop-down
    Select select = new Select(driver.findElement(this.getObject(p, objectName, objectType)));
    select.selectByVisibleText(value);
    break;

