Skip to content

Instantly share code, notes, and snippets.

@pablopaul
Last active November 26, 2018 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablopaul/bba4aa8c859cf6d40b8de8ae21c06223 to your computer and use it in GitHub Desktop.
Save pablopaul/bba4aa8c859cf6d40b8de8ae21c06223 to your computer and use it in GitHub Desktop.
CodeceptJS 1.4.6. Debug White Page Failure - To see the logged page source run your tests with "--verbose"
// Add the plugin to the CodeceptJS config
...
plugins: {
logPageSource: {
require: "./logPageSource",
enabled: true
}
}
...
const Container = require("codeceptjs").container;
const helpers = Container.helpers();
const webdriverio = helpers["WebDriverIO"];
const event = require("codeceptjs").event;
module.exports = function() {
event.dispatcher.on(event.test.after, async function(test) {
console.log(await webdriverio.grabSource());
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment