title: NoSuchElementException with uiautomator2
body: <p>I'm trying to run my Python code on Sauce Labs and it works fine with <code>automationName</code> capability not set (which defaults it to <code>Appium</code> as per <a href="http://appium.io/docs/en/writing-running-appium/caps/" rel="nofollow noreferrer">http://appium.io/docs/en/writing-running-appium/caps/</a>). However, when I set this capability to <code>UiAutomator2</code>, it throws below error at the line <code>element_some_text = self.driver.find_element_by_xpath("//android.widget.TextView[@text='Some Text']")</code>:</p>
  
  <p><code>NoSuchElementException: Message: An element could not be located on the page using the given search parameters.</code></p>
  
  <p>Here's my code:</p>
  
  <pre><code>import lemoncheesecake.api as lcc
  from appium import webdriver
  
  
  @lcc.suite("My test suite")
  class my_test_suite:
      caps = {}
      driver = None
  
      def setup_suite(self):
          self.caps['appiumVersion'] = "1.8.1"
          self.caps['deviceName'] = "Android GoogleAPI Emulator"
          self.caps['deviceOrientation'] = "portrait"
          self.caps['platformVersion'] = "7.1"
          self.caps['platformName'] = "Android"
          self.caps['automationName'] = 'uiautomator2'
          self.caps['autoGrantPermissions'] = True
          self.caps['app'] = 'https://somesite.com/storage/my_app.apk'
          self.caps['appPackage'] = 'com.xxx.abc.my_app'
          self.driver = webdriver.Remote(
              'http://username:passkey@ondemand.saucelabs.com:80/wd/hub', self.caps)
  
      @lcc.test("My app test")
      def verify_app_launch(self):
          self.driver.implicitly_wait(10)
          element_some_text = self.driver.find_element_by_xpath("//android.widget.TextView[@text='Some Text']")
          element_some_text.click()
  
      def teardown_suite(self):
          self.driver.quit()
  </code></pre>