title: how to work with hybrid mobile application using appium?
body: <p>Can anybody help me,</p>
  
  <p>I have been try to test hybrid application (developed in kony ide) using appiumbut the coding not executed .then using UIautomator viewer I didn't get "resource id " so im using by.name method. is der any possibility to get resource id?? then how to make work with hybrid application . </p>
  
  <p>My coding </p>
  
  <pre><code>package com.appium.testcase;
  
  
  import org.testng.annotations.AfterMethod;
  import org.testng.annotations.Test;
  import org.testng.annotations.BeforeClass;
  
  import java.io.File;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.List;
  import java.util.concurrent.TimeUnit;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.remote.CapabilityType;
  import org.openqa.selenium.remote.DesiredCapabilities;
  import org.openqa.selenium.remote.RemoteWebDriver
  public class AppiumTest 
  {   
  WebDriver driver=null;
  
  @BeforeClass
  public void setup() 
  {
  File appDir = new File("E:/Automation/adt-bundle-windows-x86_64-20130514/sdk");
  File app = new File(appDir, "WatsCooking.apk");
  DesiredCapabilities capabilities = new DesiredCapabilities();
  capabilities.setCapability("device","Android");
  capabilities.setCapability("platformName", "Android");
  capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
  capabilities.setCapability(CapabilityType.VERSION, "5.1");// motoe
  //capabilities.setCapability(CapabilityType.VERSION, "4.2.1");//lava
  capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");
  
  capabilities.setCapability("app-Package","com.truetech.watcooking");
  //Here we mention the activity name, which is invoked initially as app's first page.
  capabilities.setCapability("app-Activity","com.truetech.watscooking.SplashActivity");
  
  capabilities.setCapability("deviceName", "ZX1B328HPW");//motoe
  //capabilities.setCapability("deviceName", "0123456789ABCDEF");//lava
  capabilities.setCapability("app", app.getAbsolutePath());
  
  try {
  driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
  
  } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);  
  
       }
  
       @Test
  public void loginTest() throws Exception {  
  
      try{
          System.out.println("call");
          List &lt;WebElement&gt; loginbt =driver.findElements(By.id("btnlogin" ));
          loginbt.get(1).click();         
    }  
  
            catch(NullPointerException ex1)
      {
  
                //System.out.println( "Value not found in Dropdown to Select");
  
  
      }
  
       }
  @AfterMethod
  public void tearDown() {
             driver.quit();
      }
  }
  </code></pre>