Element Not Visible Exception while automating Hybrid App

I am trying to automate Selendroid’s test App .

That has a Hybrid View.

Even after changing the context,I am not able to perform any activity on the WebView.

Test App: /selendroid-test-app-0.17.0.apk from Selendroid UI

Appium Version: 1.6.5

Script:
driver.findElementById(“io.selendroid.testapp:id/buttonStartWebview”).click();

    Set<String> views = driver.getContextHandles();
  
    
    Iterator it=views.iterator();
    
    while(it.hasNext()){
    	System.out.println(it.next());
    }
    
    driver.context("WEBVIEW_io.selendroid.testapp");
    Thread.sleep(3000);
    System.out.println("Current view is"+driver.getContext());
    
    System.out.println(driver.getPageSource());
    driver.findElement(By.xpath("//*[@id='name_input']")).sendKeys("test");;

Eclipse Log


[TestNG] Running:

NATIVE_APP
WEBVIEW_io.selendroid.testapp
Current view isWEBVIEW_io.selendroid.testapp

Say Hello DemoHello, can you please tell me your name?



Prefered Car:
VolvoMercedesAudi



FAILED: f org.openqa.selenium.ElementNotVisibleException: element not visible (Session info: webview=30.0.0.0) (Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 1.04 seconds

I had a similar problem. thread.sleep helped.

Can you try to put some sleep before driver.findElement(By.xpath("//*[@id=‘name_input’]")).sendKeys(“test”);;