title: selectByIndex(data) in Selenium Hybrid Framework for random values of dropdown
body: <p>I'm using Hybrid Framework i.e. Object, Data and Keyword all along. I'm stuck in selecting a random value of dropdown as per its Index.</p>
  
  <p>In my input file where I have mentioned the test data <a href="http://i.stack.imgur.com/smMG2.png" rel="nofollow">Test Data</a> there is a column WorkGroup in integer i.e. I've given input for Dropdown in integer form which is nothing but index value of dropdown. Now in 2nd image you can see that se.selectByIndex(data) is causing troubles.</p>
  
  <p>Error is:</p>
  
  <blockquote>
    <p>The method selectByIndex(int) in the type Select is not applicable for the arguments (String)</p>
  </blockquote>
  
  <p><a href="http://i.stack.imgur.com/e47tI.png" rel="nofollow">Code where error comes</a></p>
  
  <pre><code>public  String selectDropdown(String object,String data){
      APP_LOGS.debug("Selecting dropdown values.");               
      try{
          WebElement _directoryDDL = driver.findElement(By.id(OR.getProperty(object)));
              Select se = new Select(_directoryDDL);
              se.selectByIndex(data); // This is where error is coming. I need to use only index.
              return Constants.KEYWORD_PASS;
          }
      catch(Exception e1){
          return Constants.KEYWORD_FAIL+" Control not found.";
          }
      }
  </code></pre>
  
  <p>I can't go with <strong>selectByValue</strong> or <strong>selectByVisibleText</strong> because per user the value of dropdown changes. That's why only index value is the only solution here.</p>