Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to execute script on chrome instance before running tests. #16

Open
LukaszKiedrowski opened this issue May 7, 2018 · 1 comment

Comments

@LukaszKiedrowski
Copy link

LukaszKiedrowski commented May 7, 2018

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.

@LukaszKiedrowski
Copy link
Author

LukaszKiedrowski commented May 7, 2018

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"))');
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant