{"action":"opened","issue":{"url":"https://api.github.com/repos/appium/appium/issues/5089","labels_url":"https://api.github.com/repos/appium/appium/issues/5089/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/5089/comments","events_url":"https://api.github.com/repos/appium/appium/issues/5089/events","html_url":"https://github.com/appium/appium/issues/5089","id":74588201,"number":5089,"title":"Unable able to switch to WebView on real android device or on a simulator","user":{"login":"abhijeetkanade","id":12367752,"avatar_url":"https://avatars.githubusercontent.com/u/12367752?v=3","gravatar_id":"","url":"https://api.github.com/users/abhijeetkanade","html_url":"https://github.com/abhijeetkanade","followers_url":"https://api.github.com/users/abhijeetkanade/followers","following_url":"https://api.github.com/users/abhijeetkanade/following{/other_user}","gists_url":"https://api.github.com/users/abhijeetkanade/gists{/gist_id}","starred_url":"https://api.github.com/users/abhijeetkanade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhijeetkanade/subscriptions","organizations_url":"https://api.github.com/users/abhijeetkanade/orgs","repos_url":"https://api.github.com/users/abhijeetkanade/repos","events_url":"https://api.github.com/users/abhijeetkanade/events{/privacy}","received_events_url":"https://api.github.com/users/abhijeetkanade/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-09T05:02:27Z","updated_at":"2015-05-09T05:02:27Z","closed_at":null,"body":"Hi,\r\n\r\nI trying to test hybrid app, so trying a sample test on a selendroid-test-app. There are two issues with WebView on a android.\r\n\r\nTried following code to get context names:\r\n\r\nfor (String contextName : contextNames) {\r\n\r\nSystem.out.println(contextName); //prints out something like NATIVE_APP \\n WEBVIEW_1\r\n\r\n//driver.context(contextName);\r\n\r\n}\r\n\r\n1. On real device, it only returns NATIVE_APP view, so can't even try to switch to web view on a real device.\r\n\r\n2. on a simulator, we do get a web view. e.g. for selendroid app, above code returns\r\n\r\nNATIVE_APP\r\n\r\nWEBVIEW_io.selendroid.testapp\r\n\r\nhowever while trying to switch to webview getting error\r\n\r\ndriver.context(\"WEBVIEW_io.selendroid.testapp\");\r\n\r\norg.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver) (WARNING: The server did not provide any stacktrace information)\r\nCommand duration or timeout: 5.97 seconds\r\nBuild info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'\r\nSystem info: host: 'abhijeet-PC', ip: '192.168.1.4', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_21'\r\nSession ID: 389c9143-9a3f-456f-8e23-251b515579b1\r\nDriver info: io.appium.java_client.android.AndroidDriver\r\nCapabilities [{newCommandTimeout=120, platformVersion=4.1, app=C:\\Users\\abhijeet\\Google Drive\\Selenium\\Android Projects\\MavenApp2\\app\\selendroid-test-app-0.15.0.apk, platform=LINUX, databaseEnabled=false, javascriptEnabled=true, platformName=Android, deviceName=Android device, browserName=Android, webStorageEnabled=false, networkConnectionEnabled=true, desired={newCommandTimeout=120, app=C:\\Users\\abhijeet\\Google Drive\\Selenium\\Android Projects\\MavenApp2\\app\\selendroid-test-app-0.15.0.apk, deviceName=Android device, platformName=Android}, locationContextEnabled=false, warnings={}, takesScreenshot=true}]\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)\r\n\tat java.lang.reflect.Constructor.newInstance(Unknown Source)\r\n\tat org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)\r\n\tat org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)\r\n\tat org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)\r\n\tat io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:180)\r\n\tat io.appium.java_client.AppiumDriver.context(AppiumDriver.java:525)\r\n\tat tests.AppiumSample.selendroidTest1(AppiumSample.java:53)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\r\n\tat java.lang.reflect.Method.invoke(Unknown Source)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)\r\n\tat org.testng.internal.Invoker.invokeMethod(Invoker.java:714)\r\n\tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)\r\n\tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)\r\n\tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)\r\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)\r\n\tat org.testng.TestRunner.privateRun(TestRunner.java:767)\r\n\tat org.testng.TestRunner.run(TestRunner.java:617)\r\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:334)\r\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)\r\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)\r\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:240)\r\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1149)\r\n\tat org.testng.TestNG.run(TestNG.java:1057)\r\n\tat org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)\r\n\tat org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)\r\n\tat org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)\r\n\r\nrequest you to please look into matter.\r\n"}}