vbot
vbot copied to clipboard
Ability to execute script on chrome instance before running tests.
Hi!
I was looking for solution to set up sessionStorage of the browser before running VRT but I cannot find it.
What do you think about ability to execute js script on chrome instance before running tests?
kind regards, Lucas K.
Actually I have found way to do it.... :) it would be good if you can add method for it or atleast add code below to documentation
vbot.on('scenario.start', () => {
vbot
.chromejs
.eval('window.sessionStorage.setItem("example_name", "this is example var value!")');
vbot
.chromejs
.eval('window.alert(window.sessionStorage.getItem("example_name"))');
});