title: How to get page-source of an element in mobile native app by selenium script?
body: <p>I'm using Appium for automation of mobile application and I want is just the pagesource of an element of a native app. I have googled a lot and found that its possible for webpages but did not get any solution for mobile's native app.
  like below examples.</p>
  
  <pre><code>elem.getAttribute("innerHTML");
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>WebElement element = driver.findElement(By.id("foo"));
  String contents = (String)((JavascriptExecutor)driver).executeScript("return arguments[0].innerHTML;", element);
  </code></pre>