Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read OTP from gmail in protractor?

Conf.js

How to read OTP from gmail. I tried but am not able to and also am not getting any error.

like image 697
nrs Avatar asked Jun 09 '17 12:06

nrs


1 Answers

You can use a few mail listener approaches for a cleaner solution, inbucket and mail-listener2 are two popular solutions for email reading purposes in e2e testing.

I would personally recommend inbucket for its simple implementation. You can run it as a docker container with a simple command mentioned here, and then consume the exposed APIs using this Javascript Client.

You can also use mail-listener2, it also offers the same functionality but requires a few configuration in the .conf file.

like image 108
GoWin Avatar answered Oct 28 '22 13:10

GoWin