title: How can i swipe horizontally after locating an element using Appium in an Android app?
body: <p>I have used the following code, but it is not working: </p>
  
  <pre><code>int startX = driver.findElement(By.xpath("//*[@class='android.widget.FrameLayout' and @index='1']")).getLocation.getX();
  int startY = driver.findElement(By.xpath("//*[@class='android.widget.FrameLayout' and @index='1']")).getLocation.getY();
  </code></pre>
  
  <p>and the error I get is:</p>
  
  <pre><code>getLocation cannot be resolved or is not a field
  </code></pre>