title: Select one option from many options in drop down list in Eclipse using java when run code for the android device
body: <p><strong>I want to select the one option from many options in dropdown menu in eclipse using java and run code for the android device.</strong></p>
  
  <p><strong><em>code</em></strong> </p>
  
  <pre><code>  public class Selendroid {
      private static AndroidDriver driver;
      public static void main(String[] args) throws MalformedURLException, InterruptedException {
          // TODO Auto-generated method stub
          // Create object of DesiredCapabilities class                             
          DesiredCapabilities capabilities = new DesiredCapabilities();
          // Optional
          capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
          // Specify the device name (any name)
          capabilities.setCapability("deviceName", "My New Phone");
          // Platform version
          capabilities.setCapability("platformVersion", "5.1");
          // platform name
          capabilities.setCapability("platformName", "Android");
          // specify the application package that we copied from appium                
          capabilities.setCapability("appPackage", "com.testingqw.laborfind");
          // specify the application activity that we copied from appium                   
          capabilities.setCapability("appActivity", "com.testingqw.laborfind.Activity.SplashScreen");
          // Start android driver I used 4727 port by default it will be 4723
          driver = new AndroidDriver(new URL("http://127.0.0.1:4727/wd/hub"), capabilities);
          // Specify the implicit wait of 5 second
          driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);
  
      driver.findElement(By.id("com.testingqw.laborfind:id/tv_default_spinner")).click();
  
            driver.findElement(By.name("English")).click();;
          // Wait for 10 second
          Thread.sleep(5000L);
  </code></pre>