Skip to content

Commit

Permalink
imporscript fix for #19 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshit-bs committed Aug 10, 2023
1 parent 0551d6e commit bb8aa74
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions nightwatch/commands/importScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,20 @@ module.exports = class Command {
document.body.appendChild(scriptEl);
};

const element = await this.api
const result = await this.api
.execute(scriptFn, [scriptFileName, scriptType])
.pause(500)
.execute(function() {
return document.querySelectorAll('#app')[0].firstElementChild;
}, [], (result) => {
const componentInstance = this.api.createElement(result.value, {
isComponent: true,
type: componentType
});
}, []);

cb(componentInstance);
const componentInstance = this.api.createElement(result, {
isComponent: true,
type: componentType
});

return componentInstance;
});
cb(componentInstance);

return element;
return componentInstance;
}
};

0 comments on commit bb8aa74

Please sign in to comment.