We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
const setupMailBox = function () { var MailListener = require('mail-listener2'); var mailListener = new MailListener({ username: 'your_outlook_id', password: 'your_password', host: 'outlook.office365.com', port: 993, tls: true, tlsOptions: { rejectUnauthorized: false }, fetchUnreadOnStart: true }); mailListener.start(); mailListener.on(`server:connected`, function() { console.log('Mail listener initialized'); }); mailListener.on('server:disconnected', function() { console.log('imapDisconnected'); }); mailListener.on('error', function(err) { console.log('mail-listener2:: An error occurred', err); }); global.mailListener = mailListener; }
Then invoke this function inside your conf file:
onPrepare() { setupMailBox(); browser.manage().window().maximize(); browser.manage().timeouts().implicitlyWait(3000); browser.waitForAngularEnabled(false); }, params: { getLastEmail: function() { var deferred = protractor.promise.defer(); console.log('Waiting for an email...'); mailListener.on('mail', function(mail) { deferred.fulfill(mail); }); return deferred.promise; } }
In spec file use it like this:
return browser.wait(browser.params.getLastEmail()).then((email) => { console.log(email) });
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: