@bucky24/jsbehave 0.12.8 → 0.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +3 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -381,7 +381,8 @@ function setActiveBrowser([ name ]) {
|
|
|
381
381
|
function closeBrowserWithName([ name ]) {
|
|
382
382
|
const driver = getVariable(`jsbehave.driver.${name}`);
|
|
383
383
|
if (!driver) {
|
|
384
|
-
|
|
384
|
+
console.log(`Unable to close browser with name "${name}": no driver found`);
|
|
385
|
+
return;
|
|
385
386
|
}
|
|
386
387
|
delete variables[`jsbehave.driver.${name}`];
|
|
387
388
|
return driver.close();
|
|
@@ -450,7 +451,7 @@ async function takeScreenshot(test) {
|
|
|
450
451
|
console.error(`Unable to take screenshot - driver does not exist`);
|
|
451
452
|
return;
|
|
452
453
|
}
|
|
453
|
-
const image = activeDriver.takeScreenshot();
|
|
454
|
+
const image = await activeDriver.takeScreenshot();
|
|
454
455
|
const useTest = test.replace(/ /g, "_");
|
|
455
456
|
let configPath = getVariable("screenshotDirectory");
|
|
456
457
|
const fileName = `test_${useTest}_failure_${activeBrowser}.png`;
|