title: Unable to click/select the button and text field
body: <p><a href="http://i.stack.imgur.com/3YDjm.jpg" rel="nofollow">enter image description here</a>Friends,</p>
  
  <p>Below is my code, the app launches when run, but its unable to select the button, gives an error as below:</p>
  
  <p>Is it because i am using RemoteWebDriver instead of AndroidDriver?</p>
  
  <p>Appium error log:</p>
  
  <pre><code> &gt; info: [debug] Responding to client with error: {"status":7,"value":{"message":"An element could not be located on the page using the given search parameters.","origValue":"Element was not found."},"sessionId":"633dd3fe-7233-eb66-8903-c63b69246cf0"}
  &gt; info: &lt;-- POST /wd/hub/session/633dd3fe-7233-eb66-8903-c63b69246cf0/element 500 30181.879 ms - 201 
  </code></pre>
  
  <blockquote>
    <p>info: --> DELETE /wd/hub/session/633dd3fe-7233-eb66-8903-c63b69246cf0 {}
    info: Shutting down appium session</p>
  </blockquote>
  
  <p>Eclipse error log:</p>
  
  <pre><code>Test Started
  FAILED: test
  org.openqa.selenium.NoSuchElementException: An element could not be located   on the page using the given search parameters. (WARNING: The server did not   provide any stacktrace information)
   Command duration or timeout: 30.19 seconds
   For documentation on this error, please visit:     http://seleniumhq.org/exceptions/no_such_element.html
    Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:20'
    System info: host: 'NCA1026471', ip: '192.168.56.1', os.name: 'Windows 7',   os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_66'
   Driver info: org.openqa.selenium.remote.RemoteWebDriver
   Capabilities [{app=C:\Appium\selendroid-test-app-0.17.0.apk,     appPackage=io.selendroid.testapp, rotatable=true, networkConnectionEnabled=true,    warnings={}, handlesAlerts=true, deviceName=Lokesh Gangaiah, version=0.17.0,   platform=ANDROID, appActivity=io.selendroid.testapp.HomeScreenActivity, desired=  {app=C:\Appium\selendroid-test-app-0.17.0.apk, appPackage=io.selendroid.testapp,  appActivity=io.selendroid.testapp.HomeScreenActivity, platformVersion=5.0,  browserName=, platformName=Android, deviceName=Lokesh Gangaiah, device=Android}, acceptSslCerts=true, platformVersion=21, automationName=selendroid,   browserName=selendroid, takesScreenshot=true, javascriptEnabled=true,  platformName=android, device=Android}]
  Session ID: 633dd3fe-7233-eb66-8903-c63b69246cf0
   *** Element info: {Using=id,   value=io.selendroid.testapp:id/buttonStartWebview}
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  </code></pre>
  
  <p>java code:</p>
  
  <pre><code> import java.io.File;
   import java.net.URL;
   import java.util.concurrent.TimeUnit;
   import io.appium.java_client.MobileElement;
   import io.appium.java_client.android.AndroidDriver;
   import org.openqa.selenium.By;
   import org.openqa.selenium.WebElement;
   import org.openqa.selenium.mobile.*;
   import org.openqa.selenium.remote.CapabilityType;
   import org.openqa.selenium.remote.DesiredCapabilities;  
   import org.openqa.selenium.remote.RemoteWebDriver;
   import org.testng.annotations.AfterClass;
   import org.testng.annotations.BeforeClass;
   import org.testng.annotations.Test;
  
   public class testP1 {
  
   public static RemoteWebDriver driver;
  //public static AndroidDriver&lt;MobileElement&gt; driver;
  
  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
  
          File appDir = new File ("C:\\Appium\\");
          //File app = new File (appDir,"CarsGuide com   au_v1.0.8.1_apkpure.com.apk");
          File app = new File (appDir,"selendroid-test-app-0.17.0.apk");
          DesiredCapabilities capabilities = new DesiredCapabilities();
          capabilities.setCapability("browserName", "");
          //capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
  
          capabilities.setCapability("platformName", "Android");
          capabilities.setCapability("deviceName", "Lokesh Gangaiah");
          capabilities.setCapability("platformVersion", "5.0");
          capabilities.setCapability("device", "Android");
  
          capabilities.setCapability("app",app.getAbsolutePath());
          capabilities.setCapability("appPackage", "io.selendroid.testapp");
          capabilities.setCapability("appActivity", "io.selendroid.testapp.HomeScreenActivity");
  
          //capabilities.setCapability("appPackage", "au.com.carsguide");
          //capabilities.setCapability("appActivity", "au.com.carsguide.activity.HomeActivity");
  
          driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
          driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  
  }
  
  @Test
  public void test() throws InterruptedException {
  
      System.out.println("Test Started");
  
      WebElement ButtonElement =     driver.findElementById("io.selendroid.testapp:id/buttonStartWebview");
      ButtonElement.click();
  
      Thread.sleep(3000L);
  
      System.out.println("Test has been completed");
  
      //System.out.println("Hello2");
  
  
      //       driver.findElementByName("Search Cars for Sale").click();
      //By.id("au.com.carsguide:id/search_btn").findElement(driver).click();
      Thread.sleep(1000L);
  
     }
  
    @AfterClass
       public void tearDown()
       {
          driver.quit();
      }
  
   }
  </code></pre>
  
  <p>New error after adding wait : log from the eclipse console</p>
  
  <pre><code> Test Started
   FAILED: test
   org.openqa.selenium.TimeoutException: Timed out after 20 seconds waiting for visibility of element located by By.id:    io.selendroid.testapp:id/buttonStartWebview
  </code></pre>
  
  <p>Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:20'
  System info: host: 'NCA1026471', ip: '192.168.56.1', os.name: 'Windows 7',   os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_66'
      Driver info: org.openqa.selenium.remote.RemoteWebDriver
      Capabilities [{app=C:\Appium\selendroid-test-app-0.17.0.apk,      appPackage=io.selendroid.testapp, rotatable=true, networkConnectionEnabled=true,   warnings={}, handlesAlerts=true, deviceName=Lokesh Gangaiah, version=0.17.0,   platform=ANDROID, appActivity=io.selendroid.testapp.HomeScreenActivity, desired={app=C:\Appium\selendroid-test-app-0.17.0.apk, appPackage=io.selendroid.testapp,    appActivity=io.selendroid.testapp.HomeScreenActivity, platformVersion=5.0, browserName=, platformName=Android, deviceName=Lokesh Gangaiah, device=Android},    acceptSslCerts=true, platformVersion=21, automationName=selendroid, browserName=selendroid, takesScreenshot=true, javascriptEnabled=true,   platformName=android, device=Android}]
       Session ID: 990a6104-0d06-f75a-876c-531a23388b7c</p>
  
  <h2>Tried With AndroidDriver get below err:</h2>
  
  <pre><code> FAILED CONFIGURATION: @BeforeClass setUpBeforeClass
   java.lang.Error: Unresolved compilation problems: 
   The return types are incompatible for the inherited methods   FindsByAccessibilityId&lt;WebElement&gt;.findElementsByAccessibilityId(String),   AppiumDriver&lt;RequiredElementType&gt;.findElementsByAccessibilityId(String)
  The return types are incompatible for the inherited methods   FindsByCssSelector.findElementsByCssSelector(String),   AppiumDriver&lt;RequiredElementType&gt;.findElementsByCssSelector(String)
  </code></pre>