aldrine00
aldrine00

Reputation: 97

Unable to return function value from custom command

I am having a hard time returning a value from a custom command function to the main file.

command.js

enter image description here

spec.js

enter image description here

it does not return the expected value

Upvotes: 0

Views: 98

Answers (1)

Mikhail Bolotov
Mikhail Bolotov

Reputation: 1104

Do you want to return the decodedTotp value? If yes, you have to do this explicitly at the end of your custom function:

<...>
    console.log(decodedTotp)
    return decodedTotp
  })
})

Upvotes: 1

Related Questions