title: Not able to find element by XPATH using Appium / Python
body: <p>I am automating a flow that consists in tapping in the Product Name from a Product List which is a Xamarin ListView to go into de Product Details Page.</p>
  
  <p>I have set in my ListView:</p>
  
  <pre><code>AutomationProperties.IsInAccessibleTree="false"
  </code></pre>
  
  <p>And in the Product Name Label:</p>
  
  <pre><code>AutomationId="ProductName"
  </code></pre>
  
  <p>The funny thing is that when using Appium Desktop UI inspection tool I can see the XPATH and if I record tapping into it, it actually works and I get this script:</p>
  
  <pre><code>MobileElement el1 = (MobileElement) driver.findElementByXPath("(//XCUIElementTypeStaticText[@name=\"ProductName\"])[1]");
  el1.click();
  </code></pre>
  
  <p>For that I know that the XPATH exists and is visible to Appium. It works in the inspection tool.</p>
  
  <p>Now, when I translate this to Python, something goes wrong:</p>
  
  <pre><code>el1 = self.driver.find_element_by_xpath("(//XCUIElementTypeStaticText[@name=\"ProductName\"])[1]")
  </code></pre>
  
  <p>I get this error message:</p>
  
  <p>el = self.driver.find_element_by_xpath(element_query)
          File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 393, in find_element_by_xpath
            return self.find_element(by=By.XPATH, value=xpath)
          File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 966, in find_element
            'value': value})['value']
          File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
            self.error_handler.check_response(response)
          File "/Users/joseclua/Library/Python/3.7/lib/python/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
            raise wde
          File "/Users/joseclua/Library/Python/3.7/lib/python/site-packages/appium/webdriver/errorhandler.py", line 24, in check_response
            super(MobileErrorHandler, self).check_response(response)
          File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
            raise exception_class(message, screen, stacktrace)
        selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.</p>