title: Selenium on AWS Device Farm cant locate element by xpath
body: <p>I'm new to ADF. I'm writing hybrid test scripts and I would like to know why it is not possible to find element thru its xpath on Amazon Device Farm Appium JUnit.</p>
  
  <p>I tested and I can do this:</p>
  
  <p><code>action.click(By.id("menu"), "Click on menu");</code></p>
  
  <p>But I <strong>can't</strong> do this:</p>
  
  <p><code>action.click(By.xpath("//*[@id=\"menu\"]"), "Click on menu");</code></p>
  
  <p>I have a couple os test scripts which I used to test on SauceLabs and I had no problem with it. It could identify all the elements presents onscreen, but I haven't found any explanation of why xpaths are not accepted on AWS Device Farm.</p>
  
  <p>Edit:
  Error message</p>
  
  <pre><code>AppTest failed: Argument was an invalid selector (e.g. XPath/CSS). (WARNING: 
  The server did not provide any stacktrace information) Command duration or 
  timeout: 151 milliseconds For documentation on this error, please visit: 
  http://seleniumhq.org/exceptions/invalid_selector_exception.html Build info: 
  version: '3.1.0', revision: 'b94c902', time: '2017-02-16 12:21:31 -0800' 
  System info: host: 'ip-172-31-13-65', ip: '172.31.13.65', os.name: 'Linux', 
  os.arch: 'amd64', os.version: '3.13.0-139-generic', java.version: 
  '1.8.0_151' Driver info: io.appium.java_client.android.AndroidDriver `
  </code></pre>