Pass Data From One Spec To Another

preview_player
Показать описание
Here is how you can pass data from one spec to another (caution: this approach makes the test execution dependent on the order of specs, which is an anti-pattern). You send it from the spec to the plugins file, where it is stored while the browser closes one spec and opens another.

Рекомендации по теме
Комментарии
Автор

Thanks for video Gleb, my solution for this type of issues were always write this data to a temporary file. (txt, json etc.) After that i read this data from temporary file and use it in any other spec files which is i wanted. Now i can try this as well.

sezerdonmez
Автор

great solution.Thank you Gleb! Definitely will try it

tonia
Автор

how about if the variable to pass into another page is a local variable (within a .then() or a loop inside a function)? How to allow the passing in that case?

mlsmat
Автор

Thanks for the video Gleb, but what if we need to save 2 variables? and use them in different places

bvb_moreno
Автор

Thanks for the video Gleb, Can you please create a video to aseert a given element value is date or not.
I will be eagerly waiting for your reply.

tejkumarkempaiah
Автор

What is the difference btw this solution and aliasing ?? I use alias to pass data to other spec/feature.

patrickobi