title: Giving TypeError: client.findElement is not a function. when trying to locate android app element through javascript and mocha
body: <p><strong>I am trying to locate the element using Javascript, appium, WebdriverIo and Mocha. The app is getting launch on emulator but getting error while locating element.Any other approach that can be used?</strong></p>
  
  <p>The testclass.js file code is given below:</p>
  
  <pre><code>const wdio = require("webdriverio");
  
  
  //example capabilities
  
  
  const opts = {
  port: 4723,
  capabilities: {
  
    platformName: "Android",
  
    deviceName: "emulator-5554",
  
   app: "D:demo.apk",
  
   appPackage: "com.somepackage",
  
   appActivity: "com.somepackage.acivity",
  
  newCommandTimeout: 500,
  
  noReset: "true",
  
  automationName: "UiAutomator2"
  
   }
    };
  
   var client =  wdio.remote(opts);
  
  
   describe('Test App launch', function () {
     this.timeout(15000);
  
     it('register', async function(){
  
  // This is the error line below
  
    **const elm = await client.findElement("resource-id","goRegistrationButton")**
  
  elm.click();
  
    });
   });
  </code></pre>
  
  <p><strong>package.json file:</strong></p>
  
  <pre><code>{
    "name": "testclass",
    "version": "1.0.0",
    "description": "Automating app",
    "main": "testclass.js",
    "scripts": {
      "test": "testclass.js"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
     "mocha": "^6.0.2",
     "typescript": "^3.3.4000",
     "webdriverio": "^5.7.6"
   },
  "devDependencies": {
    "ts-node": "^8.0.3"
   }
  }
  </code></pre>
  
  <p>I am expecting to click the element for the native android app using javascript and webdriverIO</p>