dimanche 29 juillet 2018

TypeError: fn.call is not a function

So I'm using Appium with WebdriverIO to run tests and right now I'm trying to call/reference functions from a dictionary file. But I keep getting "TypeError: fn.call is not a function" everytime I try to call the function from another file instead of copy pasting the function.

Here's a snippet of the relevant codes:

//File I'm trying to reference
exports.toLoginPassword=function() {
      return client
        .waitForExist('android=new UiSelector().resourceId("com.orgname.dcpApp:id/frmAppLanding")')
        .setValue('android=new UiSelector().resourceId("com.orgname.dcpApp:id/tbxEntry")', input.username)
        .click('android=new UiSelector().resourceId("com.orgname.dcpApp:id/flxLoginActions")')
        .waitForExist('android=new UiSelector().resourceId("com.orgname.dcpApp:id/frmLoginPassword")')        
        .then(function (result){
          assert.equal(result, true)
        })
      }
 describe('Log in', function() {
    it('should go to full login page', `${dictionary.toLoginPassword}`)

Aucun commentaire:

Enregistrer un commentaire