CodeceptJS Helper to read SMS on Twilio Online Numbers, useful for OTP based Authentication with Appium
npm install codeceptjs-twiliohelper
npm i codeceptjs-twiliohelper --save
`Configuration
`
{
//...
helpers: {
TwilioHelper: {
require: "codeceptjs-twiliohelper",
accountID: process.env.TWILIO_ACCOUNT_SID,
authToken: process.env.TWILIO_ACCOUNT_AUTH_TOKEN,
},
//...
}
`Usage
After installing the node modules, inside your codeceptjs tests, use:
`
I.readSMS(sentAfter, "+XXXXXX");
``Please Note: readSMS returns only the most recent SMS post timestamp.