Getting "ElementNotVisibleException" though element is visible

I am getting ElementNotVisibleException though the element is visible.

I have downloaded the Selendroid test app from below and installed on Emulator(Android 5.1)
https://mvnrepository.com/artifact/io.selendroid/selendroid-test-app/0.17.0

Below is the code which i tried. Once the focus moves to WebView, it is able to get text of the edit box, but unable to enter any value in the textbox and getting “ElementNotVisibleException”. Can someone tell we root cause of this?

public class WebView_SelendroidApp 
{
	AndroidDriver driver;
	
	@BeforeTest
	public void gearUp() throws Exception
	{
		DesiredCapabilities capabilities=new DesiredCapabilities();
		capabilities.setCapability("deviceName","emulator-5554");
		capabilities.setCapability("appPackage", "io.selendroid.testapp");  
        capabilities.setCapability("appActivity", ".HomeScreenActivity");
        capabilities.setCapability("platformName","Android");
        
        driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
        driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
        
        
	}
	
	@Test
	public void webviewTest() throws Exception
	{
		System.out.println("Clicked on Chrome Icon to navigate to WebView");
		driver.findElementByAndroidUIAutomator("resourceId(\"io.selendroid.testapp:id/buttonStartWebview\")").click();
		
    		
		Set<String> contexts=driver.getContextHandles();
		for(String context:contexts)
			System.out.println(context);
		
		driver.context("WEBVIEW_io.selendroid.testapp");
		
		Thread.sleep(10000);
		
		WebElement weName=driver.findElement(By.id("name_input"));
		if(weName.isEnabled())
		{
			System.out.println("Navigated to webview");
			System.out.println("Current value of the text "+weName.getAttribute("value"));
			System.out.println("Clearing existing content");
			**driver.findElement(By.id("name_input")).click(); //The script is failing here. Why it is failing here? though it is able to gettext in above statement.**
			Thread.sleep(1000);
			driver.findElement(By.id("name_input")).clear();
			Thread.sleep(3000);
			String strUsername="Uday";
			System.out.println("Entering name as '"+strUsername+"'");
			driver.findElement(By.id("name_input")).sendKeys(strUsername);
			
			WebElement weCar=driver.findElement(By.name("car"));
			Select selCar=new Select(weCar);
			String strCar="Mercedes";
			System.out.println("Select Car as '"+strCar+"'");
			selCar.selectByVisibleText(strCar);
			
			System.out.println("Click on 'Send me your name' button'");
			driver.findElement(By.xpath("//input[@value='Send me your name.*']")).click();
			
			WebElement weUsername=driver.findElement(By.xpath("//*[contains(.,'Your name is:')]"));
			if(weUsername.isEnabled())
				System.out.println("Username verification is successful");
			else
				System.out.println("Username verification is failed");
			
		}
		else
			System.out.println("Failed navigated to webview");
		
	}
	
	@AfterTest
	public void tearDown()
	{
		driver.quit();
	}
}

Following is the Output:

Clicked on Chrome Icon to navigate to WebView
NATIVE_APP
WEBVIEW_io.selendroid.testapp
Navigated to webview
Current value of the text Enter your name here!
Clearing existing content
FAILED: webviewTest
org.openqa.selenium.ElementNotVisibleException: An element command could not be completed because the element is not visible on the page.

Appium Server Log:

info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.8.0_25)
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 25f74f69-adae-4c56-b66d-1fc9b39573b1
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_45
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: [debug] Checking whether adb is present
info: [debug] Using adb from D:\UD\AndroidSDK\platform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
info: [debug] Starting logcat capture
warn: No app capability, can’t parse package/activity
info: [debug] Getting device API level
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: Device API level is: 22
info: [debug] Apk doesn’t exist locally
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “rm -rf /data/local/tmp/strings.json”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 push “D:\softies\Programs\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 install “D:\softies\Programs\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 install “D:\softies\Programs\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json…
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“wake”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “dumpsys window”
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“getDataDir”,“params”:{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“/data”}
info: [debug] dataDir set to: /data
info: [debug] Pushing command to appium work queue: [“compressedLayoutHierarchy”,{“compressLayout”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“compressedLayoutHierarchy”,“params”:{“compressLayout”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
info: [debug] Getting device API level
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 22
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.selendroid.testapp/.HomeScreenActivity”
info: [debug] Waiting for pkg “io.selendroid.testapp” and activity “.HomeScreenActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “dumpsys window windows”
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId 25f74f69-adae-4c56-b66d-1fc9b39573b1
info: ← POST /wd/hub/session 303 11712.035 ms - 9
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1 {}
info: [debug] Responding to client with success: {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“io.selendroid.testapp”,“appActivity”:“.HomeScreenActivity”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“appPackage”:“io.selendroid.testapp”,“appActivity”:“.HomeScreenActivity”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1 200 2.952 ms - 581 {“status”:0,“value”:{“platform”:“LINUX”,“browserName”:“Android”,“platformVersion”:“4.1”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“appPackage”:“io.selendroid.testapp”,“appActivity”:“.HomeScreenActivity”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“appPackage”:“io.selendroid.testapp”,“appActivity”:“.HomeScreenActivity”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/timeouts {“type”:“implicit”,“ms”:60000}
info: [debug] Set Android implicit wait to 60000ms
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/timeouts 200 2.544 ms - 76 {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“-android uiautomator”,“value”:“resourceId("io.selendroid.testapp:id/buttonStartWebview")”}
info: [debug] Waiting up to 60000ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“-android uiautomator”,“selector”:“resourceId("io.selendroid.testapp:id/buttonStartWebview")”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“-android uiautomator”,“selector”:“resourceId("io.selendroid.testapp:id/buttonStartWebview")”,“context”:“”,“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding resourceId(“io.selendroid.testapp:id/buttonStartWebview”) using ANDROID_UIAUTOMATOR with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Parsing selector: resourceId(“io.selendroid.testapp:id/buttonStartWebview”)
info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “io.selendroid.testapp:id/buttonStartWebview”
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[RESOURCE_ID=io.selendroid.testapp:id/buttonStartWebview]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“1”}}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 3949.477 ms - 87 {“status”:0,“value”:{“ELEMENT”:“1”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/1/click {“id”:“1”}
info: [debug] Pushing command to appium work queue: [“element:click”,{“elementId”:“1”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:click”,“params”:{“elementId”:“1”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: click
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:true}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/1/click 200 6156.798 ms - 76 {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“-android uiautomator”,“value”:“text("Web View Interaction")”}
info: [debug] Waiting up to 60000ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“-android uiautomator”,“selector”:“text("Web View Interaction")”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“-android uiautomator”,“selector”:“text("Web View Interaction")”,“context”:“”,“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding text(“Web View Interaction”) using ANDROID_UIAUTOMATOR with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Parsing selector: text(“Web View Interaction”)
info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “Web View Interaction”
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=Web View Interaction]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“2”}}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 3537.194 ms - 87 {“status”:0,“value”:{“ELEMENT”:“2”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/2/displayed {}
info: [debug] Pushing command to appium work queue: [“element:getAttribute”,{“elementId”:“2”,“attribute”:“displayed”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getAttribute”,“params”:{“elementId”:“2”,“attribute”:“displayed”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“true”}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/2/displayed 200 2797.995 ms - 76 {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“-android uiautomator”,“value”:“text("WebView location")”}
info: [debug] Waiting up to 60000ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“-android uiautomator”,“selector”:“text("WebView location")”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“-android uiautomator”,“selector”:“text("WebView location")”,“context”:“”,“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding text(“WebView location”) using ANDROID_UIAUTOMATOR with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Parsing selector: text(“WebView location”)
info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “WebView location”
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=WebView location]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“3”}}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 2282.149 ms - 87 {“status”:0,“value”:{“ELEMENT”:“3”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/3/displayed {}
info: [debug] Pushing command to appium work queue: [“element:getAttribute”,{“elementId”:“3”,“attribute”:“displayed”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getAttribute”,“params”:{“elementId”:“3”,“attribute”:“displayed”}}
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/3/displayed 200 175.867 ms - 76 {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“-android uiautomator”,“value”:“resourceId("io.selendroid.testapp:id/spinner_webdriver_test_data")”}
info: [debug] Waiting up to 60000ms for condition
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“-android uiautomator”,“selector”:“resourceId("io.selendroid.testapp:id/spinner_webdriver_test_data")”,“context”:“”,“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“true”}
info: [debug] Responding to client with success: {“status”:0,“value”:{“ELEMENT”:“4”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 167.788 ms - 87 {“status”:0,“value”:{“ELEMENT”:“4”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/4/displayed {}
info: [debug] Pushing command to appium work queue: [“element:getAttribute”,{“elementId”:“4”,“attribute”:“displayed”}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“find”,“params”:{“strategy”:“-android uiautomator”,“selector”:“resourceId("io.selendroid.testapp:id/spinner_webdriver_test_data")”,“context”:“”,“multiple”:false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding resourceId(“io.selendroid.testapp:id/spinner_webdriver_test_data”) using ANDROID_UIAUTOMATOR with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Parsing selector: resourceId(“io.selendroid.testapp:id/spinner_webdriver_test_data”)
info: [debug] [BOOTSTRAP] [debug] UiSelector coerce type: class java.lang.String arg: “io.selendroid.testapp:id/spinner_webdriver_test_data”
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[RESOURCE_ID=io.selendroid.testapp:id/spinner_webdriver_test_data]
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:{“ELEMENT”:“4”}}
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getAttribute”,“params”:{“elementId”:“4”,“attribute”:“displayed”}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
info: [debug] Responding to client with success: {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/4/displayed 200 228.476 ms - 76 {“status”:0,“value”:true,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/contexts {}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “cat /proc/net/unix”
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“true”}
info: [debug] WEBVIEW_9191 mapped to pid 9191
info: [debug] Getting process name for webview
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “ps”
info: [debug] Parsed pid: 9191 pkg: io.selendroid.testapp
info: [debug] from: u0_a55,9191,950,643052,76800,ffffffff,b7547435,S,io.selendroid.testapp
info: [debug] returning process name: io.selendroid.testapp
info: [debug] Available contexts:
info: [debug] [“WEBVIEW_io.selendroid.testapp”]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_io.selendroid.testapp
info: [debug] Responding to client with success: {“status”:0,“value”:[“NATIVE_APP”,“WEBVIEW_io.selendroid.testapp”],“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/contexts 200 1291.884 ms - 118 {“status”:0,“value”:[“NATIVE_APP”,“WEBVIEW_io.selendroid.testapp”],“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/context {“name”:“WEBVIEW_io.selendroid.testapp”}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “cat /proc/net/unix”
info: [debug] WEBVIEW_9191 mapped to pid 9191
info: [debug] Getting process name for webview
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “ps”
info: [debug] Parsed pid: 9191 pkg: io.selendroid.testapp
info: [debug] from: u0_a55,9191,950,643052,76704,ffffffff,b7547435,S,io.selendroid.testapp
info: [debug] returning process name: io.selendroid.testapp
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_io.selendroid.testapp
info: [debug] [“WEBVIEW_io.selendroid.testapp”]
info: [debug] Available contexts: NATIVE_APP,WEBVIEW_io.selendroid.testapp
info: [debug] Connecting to chrome-backed webview
info: [debug] Creating Chrome session
info: [debug] Set chromedriver binary as: D:\softies\Programs\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F “usebackq tokens=5” %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F “usebackq” %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b==“” TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: D:\softies\Programs\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“io.selendroid.testapp”,“androidUseRunningApp”:true,“androidDeviceSerial”:"emulator-5554”}}}}
info: [debug] Successfully started chrome session 45a458877ded2f1f4905a11b210ce1b6
info: [debug] Setting proxy session id to 45a458877ded2f1f4905a11b210ce1b6
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/context 200 5918.170 ms - 76 {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“id”,“value”:“name_input”}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6/element",“method”:“POST”,“json”:{“using”:“id”,“value”:"name_input”}}
info: [debug] Proxied response received with status 200: {“sessionId”:“45a458877ded2f1f4905a11b210ce1b6”,“status”:0,“value”:{“ELEMENT”:“0.552383832167834-1”}}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 3499.084 ms - 101
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/enabled {}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6/element/0.552383832167834-1/enabled",“method”:"GET”}
info: [debug] Proxied response received with status 200: “{"sessionId":"45a458877ded2f1f4905a11b210ce1b6","status":0,"value":true}”
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/enabled 200 900.824 ms - 72
info: → GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/attribute/value {}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6/element/0.552383832167834-1/attribute/value",“method”:"GET”}
info: [debug] Proxied response received with status 200: “{"sessionId":"45a458877ded2f1f4905a11b210ce1b6","status":0,"value":"Enter your name here!"}”
info: ← GET /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/attribute/value 200 427.715 ms - 91
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element {“using”:“id”,“value”:“name_input”}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6/element",“method”:“POST”,“json”:{“using”:“id”,“value”:"name_input”}}
info: [debug] Proxied response received with status 200: {“sessionId”:“45a458877ded2f1f4905a11b210ce1b6”,“status”:0,“value”:{“ELEMENT”:“0.552383832167834-1”}}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element 200 449.443 ms - 101
info: → POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/click {“id”:“0.552383832167834-1”}
info: [debug] Proxying command to 127.0.0.1:9515
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6/element/0.552383832167834-1/click",“method”:“POST”,“json”:{“id”:"0.552383832167834-1”}}
info: [debug] Responding to client with error: {“status”:11,“value”:{“message”:“An element command could not be completed because the element is not visible on the page.”,“origValue”:“element not visible\n (Session info: webview=39.0.0.0)\n (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.1 SP1 x86)”},“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← POST /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1/element/0.552383832167834-1/click 500 814.596 ms - 364
info: → DELETE /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1 {}
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: D:\UD\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Deleting Chrome session
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session/45a458877ded2f1f4905a11b210ce1b6",“method”:"DELETE”}
info: [debug] Cleaning up Chromedriver
info: [debug] Killing chromedriver
info: [debug] Chromedriver exited with code null
info: [debug] (killed by signal SIGTERM)
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 62.601
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}
info: ← DELETE /wd/hub/session/25f74f69-adae-4c56-b66d-1fc9b39573b1 200 4577.495 ms - 76 {“status”:0,“value”:null,“sessionId”:“25f74f69-adae-4c56-b66d-1fc9b39573b1”}

You can watch this video https://youtu.be/rONRIAsc2hg

@Free_Automation, what you wanted me to get from this video? I know how to identify objects in the application. I am able to get text from the object but not able to enter value in that editbox. My question is irrelevant with your video.

Can anybody help me on the above issue?

@UD

before “driver.findElement(By.id(“name_input”)).click();” print output
“System.out.println(driver.getPageSource())”. publish here https://gist.github.com/ and give us a link to published data

@Aleksei,

Please find the link contains the source of webview of internal html page.

(https://gist.github.com/udayanem/30f6c9cc042f9c5905ff7292a325ff2d)


As included in the above post output, it is able to get default text displayed in the input field in the web application, but not able to interact with any other elements. Getting the same ElementNotVisibleexception for other elements too.

try:

        WebElement el = driver.findElement(By.id("name_input"));
        //WebElement el = driver.findElement(MobileBy.id("name_input")); //second round
        
        int x = ((MobileElement) el).getCenter().getX();
        int y = ((MobileElement) el).getCenter().getY();
        
        System.out.println(x + ", " + y);
        // try 1
        el.click();
        // try 2
        new TouchAction(driver).tap(el).perform();
        // try 3
        new TouchAction(driver).press(el).waitAction(Duration.ofMillis(70)).release().perform();
        // try 4
        new TouchAction(driver).tap(x, y).perform();
        // try 5
        new TouchAction(driver).press(x, y).waitAction(Duration.ofMillis(70)).release().perform();

@Aleksei,

Please find the link contains the source of webview of internal html page.

(https://gist.github.com/udayanem/30f6c9cc042f9c5905ff7292a325ff2d)

I observed very strange that there is an iframe is added(observe gist URL) when Appium trying to click on these elements.

But when we follow the same step manually we are not at all seeing iframe.

I tried API Demos application also, observed the same behaviour.

Launch Api Demos -> Views -> WebView, when i changed my context to WebView and trying to click on Hello World link, getting the same ElementNotInvisible Exception.

  1. was you able to click on input_name with any given method?
  2. regarding appearing box - no idea.

I tried the methods you specified above, but no luck. However i am getting ‘x’ and ‘y’ coordinates and as specified above also i am getting default text existing from the edit box. But unable to clear the content and settext in the edit box.

Wired experience.

If possible and if have any time, can just try installing this same application and give a try?

I am hoping there is something wrong, may be Android API level or something, because i am getting same behaviour in two different applications.

I used python demo and had the same question on Emulator(4.4). Appium(Version: 1.1.0-beta.2 )