title: Youtube page(WebView) automation on android Chrome browser
body: <p>Able to successfully run opening of Youtube page(WebView) from android chrome browser in Appium 1.0.0.3.</p>
  
  <p>Guys I got struck here. Please help me to achieve my objectives.</p>
  
  <pre><code>- I can't able to identify elements inside WebView using "uiautomatorviewer.bat"
  
  - I can't able to switch to WebView through following code
         - driver.switch_to.context('WEBVIEW')
            one more I tried
         - driver.switch_to.context(webview)
  </code></pre>
  
  <h2>My objective:</h2>
  
  <h2>Scenario 1:</h2>
  
  <p>Open Youtube page on android Chrome browser.
    Select any video for playback.
    Tap on pause and play.
    Tap on Full screen button.</p>
  
  <h2>Scenario 2:</h2>
  
  <p>Open URL: "<a href="http://m.youtube.com/watch?v=7-7knsP2n5w" rel="nofollow">http://m.youtube.com/watch?v=7-7knsP2n5w</a>" on android Chrome browser.
    Tap on play button.</p>
  
  <h2>Sample code:</h2>
  
  <pre><code>from appium import webdriver
  
  desired_caps = {}
  desired_caps['automationName'] = 'Appium'
  desired_caps['platformName'] = 'Android'
  desired_caps['platformVersion'] = '4.4'
  desired_caps['deviceName'] = 'Nexus 7'
  desired_caps['browserName'] = 'Chrome'
  
  driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
  
  driver.get('http://m.youtube.com')
  
  driver.switch_to.context('WEBVIEW')    # Unable to switch to webview. Getting following error.
  </code></pre>
  
  <h2>Python interpretor error:</h2>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Python27\lib\bdb.py", line 400, in run
  exec cmd in globals, locals
  File "C:\Data\VVO\Automation\ROBOT_FRAMEWORK\AndroidTest\Appium\tmp_browser.py", line 2, in &lt;module&gt;
  from appium import webdriver
  File "build\bdist.win32\egg\appium\webdriver\switch_to.py", line 31, in context
  self._driver.execute(MobileCommand.SWITCH_TO_CONTEXT, {'name': context_name})
  File "C:\Python27\lib\site-packages\selenium-2.42.0-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 172, in execute
  self.error_handler.check_response(response)
  File "build\bdist.win32\egg\appium\webdriver\errorhandler.py", line 29, in check_response
  raise wde
  WebDriverException: Message: 'unknown command: session/d6c14715e9f6ca685030f9f56a2b698e/context'
  </code></pre>
  
  <h2>Appium server logs:</h2>
  
  <pre><code>POST /wd/hub/session/74354d82912ad3db704d67eeb04a295b/url 200 18052ms - 85b
  debug: Appium request initiated at /wd/hub/session/74354d82912ad3db704d67eeb04a295b/context
  debug: Request received with params:    {"sessionId":"74354d82912ad3db704d67eeb04a295b","name":"WEBVIEW"}
  debug: Proxying command to 127.0.0.1:9515
  info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session/74354d82912ad3db704d67eeb04a295b/
  context","method":"POST","json":{"sessionId":"74354d82912ad3db704d67eeb04a295b","name":"WEBVIEW"}}
  debug: Proxied response received with status 404: "unknown command:   session/74354d82912ad3db704d67eeb04a295b/context"
  POST /wd/hub/session/74354d82912ad3db704d67eeb04a295b/context 404 8ms - 65b
  </code></pre>