Last active
November 26, 2018 14:21
-
-
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"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add the plugin to the CodeceptJS config | |
... | |
plugins: { | |
logPageSource: { | |
require: "./logPageSource", | |
enabled: true | |
} | |
} | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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