{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/10741","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/10741/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/10741/comments","events_url":"https://api.github.com/repos/appium/appium/issues/10741/events","html_url":"https://github.com/appium/appium/issues/10741","id":325807937,"node_id":"MDU6SXNzdWUzMjU4MDc5Mzc=","number":10741,"title":"Appium 1.8.1 cannot switch to webview context for iOS real device","user":{"login":"jacattau","id":34950345,"node_id":"MDQ6VXNlcjM0OTUwMzQ1","avatar_url":"https://avatars0.githubusercontent.com/u/34950345?v=4","gravatar_id":"","url":"https://api.github.com/users/jacattau","html_url":"https://github.com/jacattau","followers_url":"https://api.github.com/users/jacattau/followers","following_url":"https://api.github.com/users/jacattau/following{/other_user}","gists_url":"https://api.github.com/users/jacattau/gists{/gist_id}","starred_url":"https://api.github.com/users/jacattau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacattau/subscriptions","organizations_url":"https://api.github.com/users/jacattau/orgs","repos_url":"https://api.github.com/users/jacattau/repos","events_url":"https://api.github.com/users/jacattau/events{/privacy}","received_events_url":"https://api.github.com/users/jacattau/received_events","type":"User","site_admin":false},"labels":[{"id":36581329,"node_id":"MDU6TGFiZWwzNjU4MTMyOQ==","url":"https://api.github.com/repos/appium/appium/labels/Mobile%20Safari","name":"Mobile Safari","color":"0052cc","default":false},{"id":474876872,"node_id":"MDU6TGFiZWw0NzQ4NzY4NzI=","url":"https://api.github.com/repos/appium/appium/labels/NeedsInfo","name":"NeedsInfo","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-05-23T17:43:18Z","updated_at":"2018-06-21T18:08:03Z","closed_at":"2018-05-28T05:26:59Z","author_association":"NONE","body":"## The problem\r\n\r\nAppium 1.8.1 cannot switch to a webview context in a hybrid app for iOS.  According to the logs it is seeing 2 views, Native and Webview, but it's saying it's timing out when trying to switch.  This just started happening in 1.8.1.  It works just fine in 1.8.0.  I am tried using the startIWDP capability and using IWDP in terminal manually with the same result.  I have updated to the latest IWDP as of issue [google/ios-webkit-debug-proxy#259](https://github.com/google/ios-webkit-debug-proxy/issues/259) and artygus updating master.  \r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.8.1 (latest release)\r\n* Last Appium version that did not exhibit the issue (if applicable): 1.8.0\r\n* Desktop OS/version used to run Appium: Mac High Sierra\r\n* Node.js version (unless using Appium.app|exe): 9.6.1\r\n* Mobile platform/version under test: iOS 11.3.1\r\n* Real device or emulator/simulator:  Real Device\r\n* Appium CLI or Appium.app|exe: CLI\r\n\r\n## Link to Appium logs\r\n\r\nhttps://gist.github.com/jacattau/9e19fc352083090c6e5c6804cd9555c4\r\n\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n\r\n`\t\tif (device.isAndroidDevice()){\r\n\t\t\tdriver.context(ANDROID_WEBVIEW_CONTEXT);\r\n\t\t} else {\r\n\t\t\twhile (driver.getContextHandles().size() != 2){\r\n\t\t\t\tSystem.out.println(\"Looking for webview\");\r\n\t\t\t\ttry{Thread.sleep(1000);}catch (Exception e){}\r\n\t\t\t}\r\n\t\t\tSet<String> contexts = driver.getContextHandles();\r\n\t\t\tString[] availableContexts = contexts.toArray(new String[0]);\r\n\t\t\tdriver.context(availableContexts[1]);\r\n\t\t}`\r\n\r\nin the last line, trying to switch to availableContexts[1] (which is the webview) does not work anymore.  the AutoWebView capability doesn't work either.\r\n"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/399194203","html_url":"https://github.com/appium/appium/issues/10741#issuecomment-399194203","issue_url":"https://api.github.com/repos/appium/appium/issues/10741","id":399194203,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTE5NDIwMw==","user":{"login":"shabsi4u","id":37675836,"node_id":"MDQ6VXNlcjM3Njc1ODM2","avatar_url":"https://avatars0.githubusercontent.com/u/37675836?v=4","gravatar_id":"","url":"https://api.github.com/users/shabsi4u","html_url":"https://github.com/shabsi4u","followers_url":"https://api.github.com/users/shabsi4u/followers","following_url":"https://api.github.com/users/shabsi4u/following{/other_user}","gists_url":"https://api.github.com/users/shabsi4u/gists{/gist_id}","starred_url":"https://api.github.com/users/shabsi4u/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shabsi4u/subscriptions","organizations_url":"https://api.github.com/users/shabsi4u/orgs","repos_url":"https://api.github.com/users/shabsi4u/repos","events_url":"https://api.github.com/users/shabsi4u/events{/privacy}","received_events_url":"https://api.github.com/users/shabsi4u/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T18:08:03Z","updated_at":"2018-06-21T18:08:03Z","author_association":"NONE","body":"@imurchie @mykola-mokhnach Is there any way this can be fixed on 1.8.1? The problem is that we have a device lab and device lab owners update appium versions only once a few months. This is planned in a couple of weeks and unless the release version is 1.8.2 at that point of time, they wil update the appium version with 1.8.1. Could this change be baked in somehow to 1.8.1 release?"}}
{"actor":{"display_login":"shabsi4u"}}